防止iwebbrowser2锁定? [英] Prevent iwebbrowser2 from locking up?

查看:70
本文介绍了防止iwebbrowser2锁定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用IWebBrowser2控件。

如果通过单击Web控件关闭上下文菜单(例如窗格标题上下文菜单),它将在当前页面上冻结。

如果不重新启动应用程序,您将无法再导航到任何其他网页。



我尝试过:



在导航到新页面之前调用m_browser的成员,包括Stop()和Quit()。

使用各种不同的命令ID调用ExecWB

My application uses an IWebBrowser2 control.
If you close a context menu (for example the pane title context menu) by clicking into the web control, it freezes on the current page.
You can no longer navigate to any other webpage without restarting the application.

What I have tried:

Calling members of m_browser, including Stop() and Quit() before navigating to the new page.
Calling ExecWB with various different command ids

推荐答案

您所描述的内容不是控件的正常行为。在你想出一个防止它发生之前,你必须弄清楚为什么事情会先锁定。



我从头开始查看控件在锁定之前加载的页面。
What you're describing is not normal behavior for the control. You have to figure out why the thing is locking up in the first place before you can come up with a "prevent it from happening".

I'd start by looking into the page that's loaded by the control before it locks.


CHtmlView和其他MSHTML / WebBrowser主机在使用CContextMenuManager TrackPopupMenu后行为不正常或停止响应Microsoft Connect [ ^ ]


这篇关于防止iwebbrowser2锁定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆