COleClientItem::OnGetWindowContext

virtual BOOL OnGetWindowContext( CFrameWnd** ppMainFrame, CFrameWnd** ppDocFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo );

Return Value

Nonzero if successful; otherwise 0.

Parameters

ppMainFrame

Pointer to a pointer to the main frame window.

ppDocFrame

Pointer to a pointer to the document frame window.

lpFrameInfo

Pointer to an OLEINPLACEFRAMEINFO structure that will receive frame window information.

Remarks

Called by the framework when an item is activated in place. This function is used to retrieve information about the OLE item’s parent window.

If the container is an MDI application, the default implementation returns a pointer to the CMDIFrameWnd object in ppMainFrame and a pointer to the active CMDIChildWnd object in ppDocFrame. If the container is an SDI application, the default implementation returns a pointer to the CFrameWnd object in ppMainFrame and returns NULL in ppDocFrame. The default implementation also fills in the members of lpFrameInfo.

Override this function only if the default implementation does not suit your application; for example, if your application has a user-interface paradigm that differs from SDI or MDI. This is an advanced overridable.

For more information, see IOleInPlaceSite::GetWindowContext and the OLEINPLACEFRAMEINFO structure in the OLE documentation.

COleClientItem OverviewClass MembersHierarchy Chart