| int IntersectClipRect(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 IntersectClipRect function creates a new clipping region from the intersection of the current region and the specified rectangle.
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.
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 | New clipping region consists of multiple rectangles. |
| ERROR | An error occurred. (The current clip-region is unaffected.) |
| NULLREGION | New clipping region is empty. |
| SIMPLEREGION | New clipping region is a single rectangle. |
The bottom and rightmost edges of the given rectangle are excluded from the clip region.