The information in this article applies to:
SYMPTOMSWhen you call GetControlUnknown() from inside a COleControl-derived class, it always returns NULL. CAUSEThe function CWnd::GetControlUnknown() should be called from the control container. RESOLUTION
Call CCmdTarget::GetControllingUnknown() instead of STATUSThis behavior is by design. MORE INFORMATION
CWnd::GetControlUnknown() can be called to check if the CWnd is being used
as a proxy, or wrapper, for a contained Activex control. It does this by
checking the m_pCtrlSite CWnd member to see if it's NULL or not. If
m_pCtrlSite is NULL, then NULL is returned. Since m_pCtrlSite is only set
when the CWnd represents a contained ActiveX control, m_pCtrlSite will
always be NULL if GetControlUnknown() is called from inside an ActiveX
control's source.
Additional query words: kbvc420 kbvc500 kbvc600
Keywords : kbole kbprg kbMFC kbVC |
Last Reviewed: January 25, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |