CreateRectRgn

  HRGN CreateRectRgn(X1, Y1, X2, Y2)    
  int X1; /* x-coordinate of upper-left corner */
  int Y1; /* y-coordinate of upper-left corner */
  int X2; /* x-coordinate of lower-right corner */
  int Y2; /* y-coordinate of lower-right corner */

The CreateRectRgn function creates a rectangular region.

Parameters

X1

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

Y1

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

X2

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

Y2

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

Return Value

The return value identifies a new region if the function is successful. Otherwise, it is 0.

Comments

The region will be exclusive of the bottom and right edges.

See Also

DeleteObject, SelectObject