Export (0) Print
Expand All
MFC
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

CDC::IntersectClipRect 

Creates a new clipping region by forming the intersection of the current region and the rectangle specified by x1, y1, x2, and y2.


int IntersectClipRect(
   int x1,
   int y1,
   int x2,
   int y2 
);
int IntersectClipRect(
   LPCRECT lpRect 
);

Parameters

x1

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

y1

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

x2

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

y2

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

lpRect

Specifies the rectangle. You can pass either a CRect object or a pointer to a RECT structure for this parameter.

The new clipping region's type. It can be any one of the following values:

  • COMPLEXREGION   New clipping region has overlapping borders.

  • ERROR   Device context is not valid.

  • NULLREGION   New clipping region is empty.

  • SIMPLEREGION   New clipping region has no overlapping borders.

GDI clips all subsequent output to fit within the new boundary. The width and height must not exceed 32,767.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.