IOleInPlaceActiveObject::OnDocWindowActivate method

Notifies the active in-place object when the container's document window is activated or deactivated.

Syntax


HRESULT OnDocWindowActivate(
  [in]  BOOL fActivate
);

Parameters

fActivate [in]

The state of the MDI child document window. If this parameter is TRUE, the window is in the act of activating; if it is FALSE, it is in the act of deactivating.

Return value

This method returns S_OK on success.

Remarks

Notes to Callers

Call IOleInPlaceActiveObject::OnDocWindowActivate when the MDI child document window is activated or deactivated and the object is currently the active object for the document.

Notes to Implementers

You should include code in this method that installs frame-level tools during object activation. These tools include the shared composite menu and/or optional toolbars and frame adornments. You should then take focus. When deactivating, the object should remove the frame-level tools. Note that if you do not call IOleInPlaceUIWindow::SetBorderSpace with pborderwidths set to NULL, you can avoid having to renegotiate border space.

While executing IOleInPlaceActiveObject::OnDocWindowActivate, do not make calls to the PeekMessage or GetMessage functions, or a dialog box. Doing so may cause the system to deadlock. There are further restrictions on which OLE interface methods and functions can be called from within IOleInPlaceActiveObject::OnDocWindowActivate.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OleIdl.h

IDL

OleIdl.Idl

IID

IID_IOleInPlaceActiveObject is defined as 00000117-0000-0000-C000-000000000046

See also

GetMessage
IOleInPlaceActiveObject
PeekMessage

 

 

Community Additions

ADD
Show:
© 2014 Microsoft