SelectClipRgn function (wingdi.h)
The SelectClipRgn function selects a region as the current clipping region for the specified device context.
Syntax
int SelectClipRgn(
[in] HDC hdc,
[in] HRGN hrgn
);
Parameters
[in] hdc
A handle to the device context.
[in] hrgn
A handle to the region to be selected.
Return value
The return value specifies the region's complexity and can be one of the following values.
Return code | Description |
---|---|
|
Region is empty. |
|
Region is a single rectangle. |
|
Region is more than one rectangle. |
|
An error occurred. (The previous clipping region is unaffected.) |
Remarks
Only a copy of the selected region is used. The region itself can be selected for any number of other device contexts or it can be deleted.
The SelectClipRgn function assumes that the coordinates for a region are specified in device units.
To remove a device-context's clipping region, specify a NULL region handle.
Examples
For an example, see Clipping Output.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |