Enables the in-place object to retrieve the window interfaces that form the window object hierarchy, and the position in the parent window where the object’s in-place activation window should be placed.
HRESULT GetWindowContext(
IOleInPlaceFrame **ppFrame, |
//Indirect pointer to location of frame interface |
IOleInPlaceUIWindow **ppDoc, |
//Indirect pointer to location of document window interface |
LPRECT lprcPosRect, |
//Points to position of in-place object |
LPRECT lprcClipRect, |
//Points to in-place object’s position rectangle |
LPOLEINPLACEFRAMEINFO lpFrameInfo |
//Points to structure |
); |
Parameters
Return Values
This method supports the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following:
Remarks
The OLEINPLACEFRAMEINFO structure provides data needed by OLE to dispatch keystroke accelerators to a container frame while an object is active in place.
When an object is activated, it calls GetWindowContext from its container. The container returns the handle to its in-place accelerator table through the OLEINPLACEFRAMEINFO structure. Before calling GetWindowContext, the object must provide the size of the OLEINPLACEFRAMEINFO structure by filling in the cb member, pointed to by lpFrameInfo.