ExcludeClipRect function (wingdi.h)

The ExcludeClipRect function creates a new clipping region that consists of the existing clipping region minus the specified rectangle.

Syntax

int ExcludeClipRect(
  [in] HDC hdc,
  [in] int left,
  [in] int top,
  [in] int right,
  [in] int bottom
);

Parameters

[in] hdc

A handle to the device context.

[in] left

The x-coordinate, in logical units, of the upper-left corner of the rectangle.

[in] top

The y-coordinate, in logical units, of the upper-left corner of the rectangle.

[in] right

The x-coordinate, in logical units, of the lower-right corner of the rectangle.

[in] bottom

The y-coordinate, in logical units, of the lower-right corner of the rectangle.

Return value

The return value specifies the new clipping region's complexity; it can be one of the following values.

Return code Description
NULLREGION
Region is empty.
SIMPLEREGION
Region is a single rectangle.
COMPLEXREGION
Region is more than one rectangle.
ERROR
No region was created.

Remarks

The lower and right edges of the specified rectangle are not excluded from the clipping region.

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

See also

Clipping Functions

Clipping Overview

IntersectClipRect