次の方法で共有


IOleInPlaceSite::GetWindowContext (Windows CE 5.0)

Send Feedback

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,  IOleInPlaceUIWindow **ppDoc,  LPRECT lprcPosRect,  LPRECT lprcClipRect,  LPOLEINPLACEFRAMEINFO lpFrameInfo);

Parameters

  • ppFrame
    [out] Address of IOleInPlaceFrame* pointer variable that receives the interface pointer to the frame. If an error occurs, the implementation must set *ppFrame to NULL.
  • ppDoc
    [out] Address of IOleInPlaceUIWindow* pointer variable that receives the interface pointer to the document window. If the document window is the same as the frame window, *ppDoc is set to NULL. In this case, the object can only use *ppFrame or border negotiation. If an error is returned, the implementation must set *ppDoc to NULL.
  • lprcPosRect
    [out] Pointer to the rectangle containing the position of the in-place object in the client coordinates of its parent window. If an error is returned, this parameter must be set to NULL.
  • lprcClipRect
    [out] Pointer to the outer rectangle containing the in-place object's position rectangle (PosRect). This rectangle is relative to the client area of the object's parent window. If an error is returned, this parameter must be set to NULL.
  • lpFrameInfo
    [out] Pointer to an OLEINPLACEFRAMEINFO structure the container is to fill in with appropriate data. If an error is returned, this parameter must be set to NULL.

Return Values

This method supports the following return values:

Value Description
S_OK The method completed successfully.
E_INVALIDARG The call to the method contains an invalid argument.
E_UNEXPECTED The call to the method unexpectedly failed.

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.

Requirements

OS Versions: Windows CE 4.0 and later.
Header: oleidl.h.

See Also

IOleInPlaceSite

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.