webbrowser加载问题。

wxh850619 2008-12-18 02:36:19
一个做好的网页用IE浏览器浏览没有问题,但是在delphi中用webbrowser加载就有问题。报invalid floating point operation错误。等待高手解决。
...全文
199 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wxh850619 2008-12-18
  • 打赏
  • 举报
回复
谢谢lcgboy ,问题已经解决。
lcgboy 2008-12-18
  • 打赏
  • 举报
回复
意思就是说,这些异常很正常,垃圾微软不严谨,没有抛出这些异常,但是我们(boland)却要抛出这些异常。、
解决办法很简单,就是在你的程序中加入如下代码:
const
MCW_EM = DWord($133f);

begin
Set8087CW(MCW_EM);
end;
至于位置,任意位置就可以了,最好是在调用webbrowser之前。
lcgboy 2008-12-18
  • 打赏
  • 举报
回复
代码都上了还不具体?

const
MCW_EM = DWord($133f);

begin
Set8087CW(MCW_EM);
end;

看不明白?
wxh850619 2008-12-18
  • 打赏
  • 举报
回复
能说得具体点吗?
lcgboy 2008-12-18
  • 打赏
  • 举报
回复
When running floating point code, such as that found in Direct 3D, you will often get a series of floating point exceptions. Microsoft supporesses these exceptions by default, but we raise them. It is easy to turn this option off in both C++Builder and Delphi.

Here is how to turn them off in C++Builder:

#include float.h

__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
_control87(MCW_EM, MCW_EM);
}

Here is how to turn them off in Delphi:

const
MCW_EM = DWord($133f);
begin
Set8087CW(MCW_EM);
end;

这是官方解决方案

5,939

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧