User32WindowFromDC Method

Returns a handle to the window associated with the specified display device context (DC).

Output functions that use the specified device context draw into this 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 WindowFromDC(
	IntPtr hDC
)

Parameters

hDC  IntPtr
Handle to the device context from which a handle to the associated window is to be retrieved.

Return Value

IntPtr
The return value is a handle to the window associated with the specified DC.

If no window is associated with the specified DC, the return value is Zero.

Remarks

See Also