The information in this article applies to:
SYMPTOMSClicking on an MFC ActiveX control that is hosted in a frame in Internet Explorer may cause an assert in CTLINPLC.CPP, line 328. CAUSEThe assert is in COleControl::BuildSharedMenu(), where it checks:
m_pUIActiveInfo->m_hSharedMenu will always be NULL because you are not
doing menu merging. m_pUIActiveInfo is set to NULL when the control is UI
de-activated. In this case, the control is inplace activated when you first
click on it, so COleControl::OnActivateInPlace() is called. This, in turn,
calls BuildSharedMenu(). When BuildSharedMenu() returns, but before
OnActivateInPlace() is exited, Internet Explorer calls
DoVerb(OLEIVERB_UIACTIVATE) on the control. This causes OnActivateInPlace()
to be re-entered and BuildSharedMenu() to be called again. Because the
control has not been UI-de-activated, m_pUIActiveInfo is not NULL.
RESOLUTION
You need to prevent OnActivateInPlace() from being re-entered by overriding
OnActivateInPlace() and setting a static boolean flag to determine if it
has been re-entered. If that is the case, then return the following:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual C++ version 6.0 for Windows. MORE INFORMATIONSteps to Reproduce Behavior
Additional query words:
Keywords : kberrmsg kbole kbIE300 kbIE301 kbMFC kbVC400bug kbVC410bug kbVC420bug kbVC500bug kbVC600fix kbIE302 AXSDKControls |
Last Reviewed: July 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |