IE 7.0 + DWebBrowserEvents2

Hello all. Sorry if i selected wrong forum :).

I have a problem with catching events from IWebBrowser2 in IE 7.

I'm using ATL to create WebBrowser control on the dialog to use it as HTML editor. After creation i call IWebBrowser2::Navigate2 to navigate "about:blank".

In IE 6 i catch events in the following order: DISPID_BEFORENAVIGATE2, DISPID_DOWNLOADCOMPLETE, DISPID_NAVIGATECOMPLETE2. And all works fine!

But in IE 7 i don't catch DISPID_NAVIGATECOMPLETE2 after DISPID_DOWNLOADCOMPLETE. Instead of it i catch DISPID_STATUSTEXTCHANGE, DISPID_COMMANDSTATECHANGE several times and then i catch DISPID_DOWNLOADBEGIN. After that i don't catch any events and WebBrowser control are freezing and any call to IHTMLDocument2 ends with Access Violation.

Where is DISPID_NAVIGATECOMPLETE2?

Can you explain me what I do wrong?

Thank you.

[895 byte] By [KonstantinL.] at [2008-2-2]
# 1

Can you supply a repro of the issue?

Thanks
-Dave

DaveMassy at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...
# 2

My configuration is WinXP SP2, IE 7.0 RC1, VC++ 2003 SP1. I'm using ATL 7.1.

Create WebBrowser control using ATL::CAxHostWindow::CreateControl,
advise to DWebBrowserEvents2 and navigate (IWebBrowser2::Navigate2) to "about:blank".

Thank you for assistance.

KonstantinL. at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...
# 3
I will add my two cents here, as well:

MS-Access Office 2003 with embedded webbrowser control. When the control trys to navigate to "about:blank", Access just dies completely.

Thanks in advance!

tonyh_omri at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...
# 4

Hi,

The disp event mechanisim required a runing message loop. The thread that create the object must run message loop and after calling navigate U can't hold the thread with any wait or sleep method.

Hope it's help.

Moti

Moti_Ank at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...
# 5
I know this and i have one. But it doesn't help. Also it works fine in IE 6.0
KonstantinL. at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Extension Development...