User32GetWindow(SafeHandle, GetWindowCmd) Method

Retrieves a handle to a window that has the specified relationship (Z-Order or owner) to the specified 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", SetLastError = true)]
public static IntPtr GetWindow(
	SafeHandle hWnd,
	GetWindowCmd gwCmd
)

Parameters

hWnd  SafeHandle
A handle to a window.

The window handle retrieved is relative to this window, based on the value of the uCmd parameter.

gwCmd  GetWindowCmd
The relationship between the specified window and the window whose handle is to be retrieved.

Return Value

IntPtr
If the function succeeds, the return value is a window handle.

If no window exists with the specified relationship to the specified window, the return value is Zero.

To get extended error information, call GetLastWin32Error.

Remarks

See Also