For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
This class implements IUnknown and provides methods that enable a windowless control to receive window messages and to participate in drag-and-drop operations.
This class and its members cannot be used in applications that execute in the Windows Runtime.
template<class T> class IOleInPlaceObjectWindowlessImpl
Your class, derived from
|IOleInPlaceObjectWindowlessImpl::ContextSensitiveHelp||Enables context-sensitive help. The ATL implementation returns E_NOTIMPL.|
|IOleInPlaceObjectWindowlessImpl::GetDropTarget||Supplies the |
|IOleInPlaceObjectWindowlessImpl::GetWindow||Gets a window handle.|
|IOleInPlaceObjectWindowlessImpl::InPlaceDeactivate||Deactivates an active in-place control.|
|IOleInPlaceObjectWindowlessImpl::OnWindowMessage||Dispatches a message from the container to a windowless control that is in-place active.|
|IOleInPlaceObjectWindowlessImpl::ReactivateAndUndo||Reactivates a previously deactivated control. The ATL implementation returns E_NOTIMPL.|
|IOleInPlaceObjectWindowlessImpl::SetObjectRects||Indicates what part of the in-place control is visible.|
|IOleInPlaceObjectWindowlessImpl::UIDeactivate||Deactivates and removes the user interface that supports in-place activation.|
The IOleInPlaceObject interface manages the reactivation and deactivation of in-place controls and determines how much of the control should be visible. The IOleInPlaceObjectWindowless interface enables a windowless control to receive window messages and to participate in drag-and-drop operations. Class
IOleInPlaceObjectWindowlessImpl provides a default implementation of
IOleInPlaceObjectWindowless and implements IUnknown by sending information to the dump device in debug builds.
HRESULT ContextSensitiveHelp(BOOL fEnterMode);
See IOleWindow::ContextSensitiveHelp in the Windows SDK.
HRESULT GetDropTarget(IDropTarget** ppDropTarget);
See IOleInPlaceObjectWindowless::GetDropTarget in the Windows SDK.
The container calls this function to get the window handle of the control.
HRESULT GetWindow(HWND* phwnd);
Some containers will not work with a control that has been windowless, even if it is currently windowed. In ATL's implementation, if the control class's data member
m_bWasOnceWindowless is TRUE, the function returns E_FAIL. Otherwise, if phwnd is not NULL,
GetWindow sets * phwnd to the control class's data member
m_hWnd and returns
See IOleWindow::GetWindow in the Windows SDK.
Called by the container to deactivate an in-place active control.
HRESULT InPlaceDeactivate(HWND* phwnd);
This method performs a full or partial deactivation depending on the state of the control. If necessary, the control's user interface is deactivated, and the control's window, if any, is destroyed. The container is notified that the control is no longer active in place. The IOleInPlaceUIWindow interface used by the container to negotiate menus and border space is released.
See IOleInPlaceObject::InPlaceDeactivate in the Windows SDK.
Dispatches a message from a container to a windowless control that is in-place active.
HRESULT OnWindowMessage( UINT msg, WPARAM WParam, LPARAM LParam, LRESULT plResultParam);
See IOleInPlaceObjectWindowless::OnWindowMessage in the Windows SDK.
See IOleInPlaceObject::ReactivateAndUndo in the Windows SDK.
Called by the container to inform the control that its size and/or position has changed.
HRESULT SetObjectRects(LPCRECT prcPos, LPCRECT prcClip);
Updates the control's
m_rcPos data member and the control display. Only the part of the control that intersects the clip region is displayed. If a control's display was previously clipped but the clipping has been removed, this function can be called to redraw a full view of the control.
See IOleInPlaceObject::SetObjectRects in the Windows SDK.
Deactivates and removes the control's user interface that supports in-place activation.
Sets the control class's data member
m_bUIActive to FALSE. The ATL implementation of this function always returns
See IOleInPlaceObject::UIDeactivate in the Windows SDK.