RoundRect function (wingdi.h)
The RoundRect function draws a rectangle with rounded corners. The rectangle is outlined by using the current pen and filled by using the current brush.
Syntax
BOOL RoundRect(
[in] HDC hdc,
[in] int left,
[in] int top,
[in] int right,
[in] int bottom,
[in] int width,
[in] int height
);
Parameters
[in] hdc
A handle to the device context.
[in] left
The x-coordinate, in logical coordinates, of the upper-left corner of the rectangle.
[in] top
The y-coordinate, in logical coordinates, of the upper-left corner of the rectangle.
[in] right
The x-coordinate, in logical coordinates, of the lower-right corner of the rectangle.
[in] bottom
The y-coordinate, in logical coordinates, of the lower-right corner of the rectangle.
[in] width
The width, in logical coordinates, of the ellipse used to draw the rounded corners.
[in] height
The height, in logical coordinates, of the ellipse used to draw the rounded corners.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The current position is neither used nor updated by this function.
Examples
For an example, see Using Filled Shapes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |