Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ExtSelectClipRgn function

The ExtSelectClipRgn function combines the specified region with the current clipping region using the specified mode.

Syntax


int ExtSelectClipRgn(
  _In_  HDC hdc,
  _In_  HRGN hrgn,
  _In_  int fnMode
);

Parameters

hdc [in]

A handle to the device context.

hrgn [in]

A handle to the region to be selected. This handle must not be NULL unless the RGN_COPY mode is specified.

fnMode [in]

The operation to be performed. It must be one of the following values.

ValueMeaning
RGN_AND

The new clipping region combines the overlapping areas of the current clipping region and the region identified by hrgn.

RGN_COPY

The new clipping region is a copy of the region identified by hrgn. This is identical to SelectClipRgn. If the region identified by hrgn is NULL, the new clipping region is the default clipping region (the default clipping region is a null region).

RGN_DIFF

The new clipping region combines the areas of the current clipping region with those areas excluded from the region identified by hrgn.

RGN_OR

The new clipping region combines the current clipping region and the region identified by hrgn.

RGN_XOR

The new clipping region combines the current clipping region and the region identified by hrgn but excludes any overlapping areas.

 

Return value

The return value specifies the new clipping region's complexity; it 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.

 

Remarks

If an error occurs when this function is called, the previous clipping region for the specified device context is not affected.

The ExtSelectClipRgn function assumes that the coordinates for the specified region are specified in device units.

Only a copy of the region identified by the hrgn parameter is used. The region itself can be reused after this call or it can be deleted.

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
SelectClipRgn

 

 

Community Additions

Show:
© 2014 Microsoft