BUG: ASSERT in WinOcc.cpp when Hosting a WebBrowser Control in an MFC ContainerID: Q231578
|
Take a CHtmlView based application or have a dialog hosting a web browser control. Go to a local folder. Right-click and select either New Folder or one of the file types listed there. It will ASSERT in WinOcc.cpp, Line 331. This does not have any impact on the release build.
This is due to a bug in MFC for UI activation of an ActiveX control.
Override the PreTranslateMessage function in the dialog class or the one derived from CHtmlView. If the message is WM_RBUTTONDOWN, return 0. The code should look like this:
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_RBUTTONDOWN)
return 0;
return CDialog::PreTranslateMessage(pMsg);
}
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
void CMyHTMLView::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate();
Navigate2(_T("C:\\Temp"),NULL,NULL);
}
Additional query words: CHtmlView
Keywords : kbActiveX kbContainer kbCtrl kbMFC kbWebBrowser
Version : winnt:
Platform : winnt
Issue type : kbbug
Last Reviewed: June 9, 1999