The information in this article applies to:
SYMPTOMSThe Microsoft WebBrowser control is used in a Microsoft Foundation Class (MFC) application and, following the dynamic creation of the control or call to ShowWindow(SW_HIDE), results in the control's methods not functioning or a debug assertion in Winocc.cpp. CAUSEIf the WebBrowser control is created dynamically without specifying the WS_VISIBLE window style, or if the control's ShowWindow(SW_HIDE) method is called, this results in a call to the control's IOleControl::DoVerb() method with the OLEVERB_HIDE verb. This in turn causes the instance of Internet Explorer to be destroyed, preventing further access to the control's methods, or if built with a debug configuration, the application asserts when CWnd methods are called for the control. RESOLUTIONSpecify the WS_VISIBLE window style when dynamically creating a WebBrowser control and do not call the control's ShowWindow(SW_HIDE) method. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Microsoft Internet Explorer 5. MORE INFORMATION
If you need to hide the WebBrowser control, call the Windows SDK
ShowWindow() API directly.
Use the following code to show the control:
© Microsoft Corporation 1998, All Rights Reserved. Additional query words:
Keywords : kbIE400bug kbIE401bug kbIE500fix |
Last Reviewed: April 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |