|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Creates a rectangular region.
void SetRectRgn( int x1, int y1, int x2, int y2 ); void SetRectRgn( LPCRECT lpRect );
- Specifies the x-coordinate of the upper-left corner of the rectangular region.
- Specifies the y-coordinate of the upper-left corner of the rectangular region.
- Specifies the x-coordinate of the lower-right corner of the rectangular region.
- Specifies the y-coordinate of the lower-right corner of the rectangular region.
- Specifies the rectangular region. Can be either a pointer to a RECT structure or a CRect object.
Unlike CreateRectRgn, however, it does not allocate any additional memory from the local Windows application heap. Instead, it uses the space allocated for the region stored in the CRgn object. This means that the CRgn object must already have been initialized with a valid Windows region before calling SetRectRgn. The points given by x1, y1, x2, and y2 specify the minimum size of the allocated space.
Use this function instead of the CreateRectRgn member function to avoid calls to the local memory manager.