Gdi32GetClipRgn(SafeHandle, IntPtr) Method

Retrieves a handle identifying the current application-defined clipping region for the specified device context.

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("GDI32.dll", SetLastError = true)]
public static int GetClipRgn(
	SafeHandle hdc,
	ref IntPtr refRegion
)

Parameters

hdc  SafeHandle
A handle to the device context (DC).
refRegion  IntPtr
A handle to an existing region before the function is called.

After the function returns, this parameter is a handle to a copy of the current clipping region.

Return Value

Int32
If the function succeeds and there is no clipping region for the given device context, the return value is 0.

If the function succeeds and there is a clipping region for the given device context, the return value is 1.

If an error occurs, the return value is -1.

Remarks

See Also