RoundRect

Syntax

BOOL RoundRect(hDC,X1,Y1,X2,Y2,X3,Y3)

This function draws a rectangle with rounded corners. The interior of the rectangle is filled by using the selected brush, and a border is drawn with the selected pen.

Parameter Type/Description  

hDC HDC Identifies the device context.  
X1 int Specifies the logical x-coordinate of the upper-left corner of the rectangle.  
Y1 int Specifies the logical y-coordinate of the upper-left corner of the rectangle.  
X2 int Specifies the logical x-coordinate of the lower-right corner of the rectangle.  
Y2 int Specifies the logical y-coordinate of the lower-right corner of the rectangle.  
X3 int Specifies the width of the ellipse used to draw the rounded corners.  
Y3 int Specifies the height of the ellipse used to draw the rounded corners.  

Return Value

The return value specifies whether the rectangle is drawn. It is nonzero if the rectangle is drawn. Otherwise, it is zero.

Comments

The width of the rectangle specified by the X1, Y1, X2, and Y2 parameters must not exceed 32,767 units. This limit applies to the height of the rectangle as well.

The current position is neither used nor updated by this function.