This topic has not yet been rated - Rate this topic

IOleInPlaceActiveObjectImpl::GetWindow

The container calls this function to get the window handle of the control.

HRESULT GetWindow(
   HWND* phwnd 
);

See IOleWindow::GetWindow in the Platform SDK.

Remarks

Some containers will not work with a control that has been windowless, even if it is currently windowed. In ATL's implementation, if the CComControl::m_bWasOnceWindowless data member is TRUE, the function returns E_FAIL. Otherwise, if *phwnd is not NULL, GetWindow assigns phwnd to the control class's data member m_hWnd and returns S_OK.

See Also

IOleInPlaceActiveObjectImpl Overview | Class Members | CComControlBase::m_bWasOnceWindowless

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.