Get the control container handle when writing ActiveX controls using the MFC

xiaoxiao2021-03-06  115

// If it is a pointer to the pointer lpolecontainer lpContainer; hResult hr = m_pclientSite-> getContainer;

// If the window handle is taken HWND m_hWndParent; IOleInPlaceSite * pOleInPlaceSite = NULL; if (NOERROR == m_pClientSite-> QueryInterface (IID_IOleInPlaceSite, (LPVOID *) & pOleInPlaceSite)) {pOleInPlaceSite-> GetWindow ((HWND *) & m_hWndParent); pOleInPlaceSite- > Release ();

转载请注明原文地址:https://www.9cbs.com/read-98087.html

New Post(0)