CreateEllipticRgn

2.x

  HRGN CreateEllipticRgn(nLeftRect, nTopRect, nRightRect, nBottomRect)    
  int nLeftRect; /* x-coordinate upper-left corner bounding rectangle */
  int nTopRect; /* y-coordinate upper-left corner bounding rectangle */
  int nRightRect; /* x-coordinate lower-right corner bounding rectangle */
  int nBottomRect; /* y-coordinate lower-right corner bounding rectangle */

The CreateEllipticRgn function creates an elliptical region.

Parameters

nLeftRect

Specifies the logical x-coordinate of the upper-left corner of the bounding rectangle of the ellipse.

nTopRect

Specifies the logical y-coordinate of the upper-left corner of the bounding rectangle of the ellipse.

nRightRect

Specifies the logical x-coordinate of the lower-right corner of the bounding rectangle of the ellipse.

nBottomRect

Specifies the logical y-coordinate of the lower-right corner of the bounding rectangle of the ellipse.

Return Value

The return value is the handle of the region if the function is successful. Otherwise, it is NULL.

Comments

The size of a region is limited to 32,767 by 32,767 logical units or 64K of memory, whichever is smaller.

When it has finished using a region created by using the CreateEllipticRgn function, an application should remove it by using the DeleteObject function.

See Also

CreateEllipticRgnIndirect, DeleteObject, PaintRgn