Function:
RoundRect(hdc, x1, y1, x2, y2, nWidth, nHeight)

 

Description:
Draws a rectangle with rounded corners on a device. The rectangle is drawn in the device's current drawing colour and is filled using its current filling colour and brush, if any.

 

Parameters:
hdc: A device context to the device to draw an object on.
x1: The x co-ordinate of the rectangle's upper-left corner.
y1: The y co-ordinate of the rectangle's upper-left corner.
x2: The x co-ordinate of the rectangle's lower-right corner.
y2: The y co-ordinate of the rectangle's lower-right corner.
nWidth: The width of each rounded corner.
nHeight: The height of each rounded corner.

 

Returns:
If successful, the function returns 1. 0 if an error occured.

 

Example:
Click on the calc icon to view a sample of the RoundRect function.