IOleInPlaceActiveObjectImpl Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at IOleInPlaceActiveObjectImpl Class.
This class provides methods for assisting communication between an in-place control and its container.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
Syntax
template<class T>
class IOleInPlaceActiveObjectImpl
Parameters
T
Your class, derived from IOleInPlaceActiveObjectImpl
.
Members
Public Methods
Name | Description |
---|---|
IOleInPlaceActiveObjectImpl::ContextSensitiveHelp | Enables context-sensitive help. The ATL implementation returns E_NOTIMPL. |
IOleInPlaceActiveObjectImpl::EnableModeless | Enables modeless dialog boxes. The ATL implementation returns S_OK . |
IOleInPlaceActiveObjectImpl::GetWindow | Gets a window handle. |
IOleInPlaceActiveObjectImpl::OnDocWindowActivate | Notifies the control when the container's document window is activated or deactivated. The ATL implementation returns S_OK . |
IOleInPlaceActiveObjectImpl::OnFrameWindowActivate | Notifies the control when the container's top-level frame window is activated or deactivated. The ATL implementation returns |
IOleInPlaceActiveObjectImpl::ResizeBorder | Informs the control it needs to resize its borders. The ATL implementation returns S_OK . |
IOleInPlaceActiveObjectImpl::TranslateAccelerator | Processes menu accelerator-key messages from the container. The ATL implementation returns E_NOTIMPL. |
Remarks
The IOleInPlaceActiveObject interface assists communication between an in-place control and its container; for example, communicating the active state of the control and container, and informing the control it needs to resize itself. Class IOleInPlaceActiveObjectImpl
provides a default implementation of IOleInPlaceActiveObject
and supports IUnknown by sending information to the dump device in debug builds.
Related Articles ATL Tutorial, Creating an ATL Project
Inheritance Hierarchy
IOleInPlaceActiveObject
IOleInPlaceActiveObjectImpl
Requirements
Header: atlctl.h
IOleInPlaceActiveObjectImpl::ContextSensitiveHelp
Enables context-sensitive help.
HRESULT ContextSensitiveHelp(BOOL fEnterMode);
Return Value
Returns E_NOTIMPL.
Remarks
See IOleWindow::ContextSensitiveHelp in the Windows SDK.
IOleInPlaceActiveObjectImpl::EnableModeless
Enables modeless dialog boxes.
HRESULT EnableModeless(BOOL fEnable);
Return Value
Returns S_OK
.
Remarks
See IOleInPlaceActiveObject::EnableModeless in the Windows SDK.
IOleInPlaceActiveObjectImpl::GetWindow
The container calls this function to get the window handle of the control.
HRESULT GetWindow(HWND* phwnd);
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 IOleWindow::GetWindow in the Windows SDK.
IOleInPlaceActiveObjectImpl::OnDocWindowActivate
Notifies the control when the container's document window is activated or deactivated.
HRESULT OnDocWindowActivate(BOOL fActivate);
Return Value
Returns S_OK
.
Remarks
See IOleInPlaceActiveObject::OnDocWindowActivate in the Windows SDK.
IOleInPlaceActiveObjectImpl::OnFrameWindowActivate
Notifies the control when the container's top-level frame window is activated or deactivated.
HRESULT OnFrameWindowActivate(BOOL fActivate);
Return Value
Returns S_OK
.
Remarks
See IOleInPlaceActiveObject::OnFrameWindowActivate in the Windows SDK.
IOleInPlaceActiveObjectImpl::ResizeBorder
Informs the control it needs to resize its borders.
HRESULT ResizeBorder(
LPRECT prcBorder,
IOleInPlaceUIWindow* pUIWindow,
BOOL fFrameWindow);
Return Value
Returns S_OK
.
Remarks
See IOleInPlaceActiveObject::ResizeBorder in the Windows SDK.
IOleInPlaceActiveObjectImpl::TranslateAccelerator
Processes menu accelerator-key messages from the container.
HRESULT TranslateAccelerator(LPMSG lpmsg);
Return Value
This method supports the following return values:
S_OK
if the message was translated successfully.
S_FALSE if the message was not translated.
Remarks
See IOleInPlaceActiveObject::TranslateAccelerator in the Windows SDK.
See Also
CComControl Class
ActiveX Controls Interfaces
Class Overview