The CreateRectRgn function creates a rectangular region.
HRGN CreateRectRgn(
int nLeftRect, |
// x-coordinate of region’s upper-left corner |
int nTopRect, |
// y-coordinate of region’s upper-left corner |
int nRightRect, |
// x-coordinate of region’s lower-right corner |
int nBottomRect |
// y-coordinate of region’s lower-right corner |
); |
If the function succeeds, the return value is the handle to the region.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
The region will be exclusive of the bottom and right edges.
CreateRectRgnIndirect, CreateRoundRectRgn, DeleteObject, SelectObject