Expand Minimize
2 out of 4 rated this helpful - Rate this topic

GetTopWindow function

Examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.

Syntax


HWND WINAPI GetTopWindow(
  _In_opt_  HWND hWnd
);

Parameters

hWnd [in, optional]

Type: HWND

A handle to the parent window whose child windows are to be examined. If this parameter is NULL, the function returns a handle to the window at the top of the Z order.

Return value

Type:

Type: HWND

If the function succeeds, the return value is a handle to the child window at the top of the Z order. If the specified window has no child windows, the return value is NULL. To get extended error information, use the GetLastError function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
GetNextWindow
GetWindow
Conceptual
Windows

 

 

Send comments about this topic to Microsoft

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.