Partager via


IOleWindow::GetWindow (Windows Embedded CE 6.0)

1/6/2010

Returns the window handle to one of the windows participating in in-place activation (frame, document, parent, or in-place object window).

Syntax

HRESULT GetWindow( 
  HWND * phwnd  
);

Parameters

  • phwnd
    [out] Pointer to where to return the window handle.

Return Value

This method supports the following return values:

Value Description

S_OK

The window handle was successfully returned.

E_FAIL

The call to the method failed.

E_INVALIDARG

The call to the method contains an invalid argument.

E_OUTOFMEMORY

The call could not be completed due to lack of free memory.

E_UNEXPECTED

The call to the method unexpectedly failed.

Note

For windowless objects, this method should always fail and return E_FAIL.

Remarks

Five types of windows comprise the windows hierarchy. When a object is active in place, it has access to some or all of these windows:

Window Description

Frame

The outermost main window where the container application's main menu resides.

Document

The window that displays the compound document containing the embedded object to the user.

Pane

The subwindow of the document window that contains the object's view. Applicable only for applications with split-pane windows.

Parent

The container window that contains that object's view. The object application installs its window as a child of this window.

In-place

The window containing the active in-place object. The object application creates this window and installs it as a child of its hatch window, which is a child of the container's parent window.

Each type of window has a different role in the in-place activation architecture. However, it is not necessary to employ a separate physical window for each type. Many container applications use the same window for their frame, document, pane, and parent windows.

Requirements

Header Oleidl.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IOleWindow