User32GetNextWindow(IntPtr, GetNextWindowCmd) Method

Retrieves a handle to the next or previous window in the Z-Order.

The next window is below the specified window; the previous window is above.

If the specified window is a topmost window, the function searches for a topmost window.

If the specified window is a top-level window, the function searches for a top-level window.

If the specified window is a child window, the function searches for a child window.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", EntryPoint = "GetWindow", SetLastError = true)]
public static IntPtr GetNextWindow(
	IntPtr hWnd,
	GetNextWindowCmd cmd
)

Parameters

hWnd  IntPtr
A handle to a window. The window handle retrieved is relative to this window, based on the value of the wCmd parameter.
cmd  GetNextWindowCmd
Indicates whether the function returns a handle to the next window, or the previous window.

Return Value

IntPtr
If the function succeeds, the return value is a handle to the next (or previous) window.

If there is no next (or previous) window, the return value is Zero.

Remarks

See Also