User32GetAncestor(IntPtr, GetAncestorFlags) Method

Retrieves the handle to the ancestor of 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", ExactSpelling = true)]
public static IntPtr GetAncestor(
	IntPtr hWnd,
	GetAncestorFlags flags
)

Parameters

hWnd  IntPtr
A handle to the window whose ancestor is to be retrieved.

If this parameter is the desktop window, the function returns Zero.

flags  GetAncestorFlags
Flags that determines the ancestor to be retrieved

Return Value

IntPtr
The return value is the handle to the ancestor window.

Remarks

See Also