Name
GetWindow
Synopsis
By first using the GetDesktopWindow or the FindWindow functions, you can obtain a handle that the GetWindow function can use to find a related window:
Public Declare Function GetWindow Lib "user32" Alias "GetWindow" _ (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Parameters
-
hwnd The handle of a window used as a starting point.
-
wCmd Defines the relationship between the window provided by the
hwndargument and the window handle to be returned by this function. Possible values of thewCmdparameter are described in greater detail below. ThewCmdargument can contain any of the following values:-
GW_CHILD(5) The returned window handle is the first child window found in the Z-order.
-
GW_ENABLEDPOPUP(6) The returned window handle is a pop-up window owned by the window represented by the
hwndargument. For Windows 2000 only.-
GW_HWNDFIRST(0) The returned window handle is the first in the Z-order with the same window type (topmost, top-level, or child) as the window represented by the
hwndargument.-
GW_HWNDLAST(1) The returned window handle is the last in the Z-order with the same window type (topmost, top-level, or child) as the window represented by the
hwndargument.-
GW_HWNDNEXT(2) The returned window handle is next in the Z-order with the same window type (topmost, top-level, or child) as the window represented by the
hwndargument.-
GW_HWNDPREV(3) The returned window handle is previous in the Z-order with the same window type (topmost, top-level, or child) ...
-
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access