ExcludeClipRect

  int ExcludeClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect)    
  HDC hdc; /* device-context handle */
  int nLeftRect; /* x-coordinate top-left corner of rectangle */
  int nTopRect; /* y-coordinate top-left corner of rectangle */
  int nRightRect; /* x-coordinate bottom-right corner of rectangle */
  int nBottomRect; /* y-coordinate bottom-right corner of rectangle */

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

Parameters

hdc

Identifies the device context.

nLeftRect

Specifies the logical x-coordinate of the upper-left corner of the rectangle.

nTopRect

Specifies the logical y-coordinate of the upper-left corner of the rectangle.

nRightRect

Specifies the logical x-coordinate of the lower-right corner of the rectangle.

nBottomRect

Specifies the logical y-coordinate of the lower-right corner of the rectangle.

Return Value

The return value specifies the new clipping region's type if the function is successful. It can be any one of the following values:

Value Meaning

COMPLEXREGION The region has overlapping borders.
ERROR No region was created.
NULLREGION The region is empty.
SIMPLEREGION The region has no overlapping borders.

Comments

The lower and right edges of the given rectangle are not excluded from the clip region.

See Also

IntersectClipRect