Share via


Gdi::SelectClipRgn_I

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

static WINGDIAPI int WINAPI SelectClipRgn_I(
  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 complexity of the region. 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

This method is an internal version of the SelectClipRgn function.

Gdi::SelectClipRgn_I uses only a copy of the selected region. You can select the region itself for any number of other device contexts or you can delete the region.

Gdi::SelectClipRgn_I 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.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

SelectClipRgn | Gdi::SetRectRgn_I

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.