SetRectRgn

  BOOL SetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect)    
  HRGN hrgn; /* handle of region */
  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 SetRectRgn function changes the specified region into a rectangular region with the specified coordinates.

Parameters

hrgn

Identifies the region.

nLeftRect

Specifies the x-coordinate of the upper-left corner of the rectangular region.

nTopRect

Specifies the y-coordinate of the upper-left corner of the rectangular region.

nRightRect

Specifies the x-coordinate of the lower-right corner of the rectangular region.

nBottomRect

Specifies the y-coordinate of the lower-right corner of the rectangular region.

Return Value

The return is TRUE if the function is successful. Otherwise, it is FALSE.

Comments

The region does not include the lower and right boundaries of the rectangle.

See Also

CreateRectRgn