我在使用EmbeddedWB 14.67.8 和14.70.0版本的时候,浏览控件嵌入到MDI主窗口中时,再另外打开另一个mdi子窗口,关闭的时候总是报一个“no mdi form”的错误,我改了下源代码
在过程constructor TEmbeddedWB.Create(Owner: TComponent)末尾加入
if (Owner is TForm) and (TForm(Owner).FormStyle = fsMDIChild) then
Owner.Tag:= 999; //fix no mdi form error
以标识所在窗口内嵌EmbeddedWB控件在过程function TAppHookWindow.MessageHook(var Msg: TMessage): Boolean修改
bContinue := IsChild(GetActiveWindow, ActiveForm.Handle)为
if Screen.ActiveForm.Tag=999 then //fix no mdi form error
bContinue := IsChild(GetActiveWindow, ActiveForm.Handle)
只有子窗口中内嵌EmbeddedWB控件时,才执行判断语句
在过程constructor TEmbeddedWB.Create(Owner: TComponent)末尾加入
if (Owner is TForm) and (TForm(Owner).FormStyle = fsMDIChild) then
Owner.Tag:= 999; //fix no mdi form error
以标识所在窗口内嵌EmbeddedWB控件在过程function TAppHookWindow.MessageHook(var Msg: TMessage): Boolean修改
bContinue := IsChild(GetActiveWindow, ActiveForm.Handle)为
if Screen.ActiveForm.Tag=999 then //fix no mdi form error
bContinue := IsChild(GetActiveWindow, ActiveForm.Handle)
只有子窗口中内嵌EmbeddedWB控件时,才执行判断语句
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货