Article ID: 150204
Article Last Modified on 11/21/2006
// The following code should return the
// actual parent window of the ActiveX control.
HWND CMyOleControl::GetActualParent()
{
HWND hwndParent = 0;
// Get the window associated with the in-place site object,
// which is connected to this ActiveX control.
if (m_pInPlaceSite != NULL)
m_pInPlaceSite->GetWindow(&hwndParent);
return hwndParent; // Return the in-place site window handle.
}
Additional query words: ocx control
Keywords: kbproperties kbctrl kbdlg kbhowto KB150204