Export (0) Print
Expand All

SelectClipRgn function

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

hdc [in]

A handle to the device context.

hrgn [in]

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 codeDescription
NULLREGION

Region is empty.

SIMPLEREGION

Region is a single rectangle.

COMPLEXREGION

Region is more than one rectangle.

ERROR

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Clipping Overview
Clipping Functions
ExtSelectClipRgn

 

 

Community Additions

ADD
Show:
© 2014 Microsoft