Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function retrieves the handle to a window that has the specified relationship to the specified window. A remote application interface (RAPI) version of this function exists, named CeGetWindow.
HWND GetWindow( HWND hWnd , UINT uCmd );
Parameters
Value | Description |
---|---|
GW_CHILD | The retrieved handle identifies the child window at the top of the z-order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows. |
GW_HWNDFIRST | The retrieved handle identifies the window of the same type that is highest in the z-order. If the specified window is a topmost window, the handle identifies the topmost window that is highest in the z-order. If the specified window is a child window, the handle identifies the sibling window that is highest in the z-order. |
GW_HWNDLAST | The retrieved handle identifies the window of the same type that is lowest in the z-order. If the specified window is a topmost window, the handle identifies the topmost window that is lowest in the z-order. If the specified window is a child window, the handle identifies the sibling window that is lowest in the z-order. |
GW_HWNDNEXT | The retrieved handle identifies the window below the specified window in the z-order. If the specified window is a topmost window, the handle identifies the topmost window below the specified window. If the specified window is a child window, the handle identifies the sibling window below the specified window. |
GW_HWNDPREV | The retrieved handle identifies the window above the specified window in the z-order. If the specified window is a topmost window, the handle identifies the topmost window above the specified window. If the specified window is a child window, the handle identifies the sibling window above the specified window. |
GW_OWNER | The retrieved handle identifies the specified window's owner window, if any. This flag will not retrieve a parent window. |
Return Values
A window handle indicates success. NULL indicates that no window exists with the specified relationship to the specified window. To get extended error information, call GetLastError.
Remarks
This function distinguishes between only top-level and child windows. Top-most windows are considered top-level windows.
In Windows CE version 1.0, the GW_OWNER flag value for the uCmdparameter is only supported for dialog boxes.
When working with RAPI for Windows CE versions 1.0 and 1.01, use the PegGetWindowfunction.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also