RoundRect function

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(
  HDC hdc,
  int left,
  int top,
  int right,
  int bottom,
  int width,
  int height
);

Parameters

hdc

A handle to the device context.

left

The x-coordinate, in logical coordinates, of the upper-left corner of the rectangle.

top

The y-coordinate, in logical coordinates, of the upper-left corner of the rectangle.

right

The x-coordinate, in logical coordinates, of the lower-right corner of the rectangle.

bottom

The y-coordinate, in logical coordinates, of the lower-right corner of the rectangle.

width

The width, in logical coordinates, of the ellipse used to draw the rounded corners.

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

   
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

See Also

Filled Shape Functions

Filled Shapes Overview

Rectangle