Subject: 包含EmbeddedWB的工程使代码助手失效的解决 [Print This Page]
Author:
rarnu Time: 2009-6-17 19:43 Subject: 包含EmbeddedWB的工程使代码助手失效的解决
是EmbeddedWB本身的问题,该控件创建时,将消息全部挂住,于是代码助手无法弹出了
修改方法如下:
找到
constructor TEmbeddedWB.Create(Owner: TComponent);
begin
inherited;
{$IFDEF DELPHI_5_UP}
EnableMessageHandler;
{$ENDIF}
GetDDEVariables;
{$IFDEF DELPHI_6_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$ENDIF}
DDEHWND := AllocateHWnd(DDEWndProc);
{$IFDEF DELPHI_6_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$ENDIF}
{---------------------------------------------}
FAbout := 'Embedded Web Browser. ' + SITE_ADDRESS;
FUserAgent := 'Mozilla/4.0(Compatible-EmbeddedWB' + VER_NUM + SITE_ADDRESS;
........ 以下代码省略
然后将其改为
constructor TEmbeddedWB.Create(Owner: TComponent);
begin
inherited;
if not (csDesigning in ComponentState) then
begin
{$IFDEF DELPHI_5_UP}
EnableMessageHandler;
{$ENDIF}
GetDDEVariables;
{$IFDEF DELPHI_6_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$ENDIF}
DDEHWND := AllocateHWnd(DDEWndProc);
{$IFDEF DELPHI_6_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$ENDIF}
end;
{---------------------------------------------}
FAbout := 'Embedded Web Browser. ' + SITE_ADDRESS;
FUserAgent := 'Mozilla/4.0(Compatible-EmbeddedWB' + VER_NUM + SITE_ADDRESS;
......以下代码省略
换言之解决方法很简单,就是在设计期不让EmbeddedWB去挂消息
这个操作将使代码助手能够正常弹出,并且程序编译后,设计期状态不存在,也不会影响控件的正常功能
Author:
Passion Time: 2009-6-17 21:21
原来橙子在加班加点解决这个问题……
Author:
rarnu Time: 2009-6-17 21:33
还多亏你找到问题的根源。。。
Welcome to CnPack Forum (http://bbs.cnpack.org/) |
Powered by Discuz! 5.0.0 |