User32IsChild Method

Determines whether a window is a child window or descendant window of a specified parent window.

A child window is the direct descendant of a specified parent window if that parent window is in the chain of parent windows; the chain of parent windows leads from the original overlapped or pop-up window to the 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", ExactSpelling = true)]
public static bool IsChild(
	IntPtr hWndParent,
	IntPtr hWnd
)

Parameters

hWndParent  IntPtr
A handle to the parent window.
hWnd  IntPtr
A handle to the window to be tested.

Return Value

Boolean
If the window is a child or descendant window of the specified parent window, the return value is .

If the window is not a child or descendant window of the specified parent window, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also