Share via


SelectClipRgn

This function selects a region as the current clipping region for the specified device context.

int SelectClipRgn(
HDC hdc, 
HRGN hrgn
); 

Parameters

  • hdc
    [in] Handle to the device context.
  • hrgn
    [in] Handle to the region to be selected.

Return Values

The return value specifies the regions complexity. NULLREGION indicates that the region is empty. SIMPLEREGION indicates that the region is a single rectangle. COMPLEXREGION indicates that the region is more than a single rectangle. ERROR indicates that an error occurred; the current clipping region is unaffected.

To get extended error Information, call GetLastError.

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-contexts clipping region, specify a NULL region handle.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Wingdi.h   Mgrgn.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetLastError, SetRectRgn

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.