This topic has not yet been rated - Rate this topic

RoundRect function

Applies to: desktop apps only

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 nLeftRect,
  __in  int nTopRect,
  __in  int nRightRect,
  __in  int nBottomRect,
  __in  int nWidth,
  __in  int nHeight
);

Parameters

hdc [in]

A handle to the device context.

nLeftRect [in]

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

nTopRect [in]

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

nRightRect [in]

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

nBottomRect [in]

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

nWidth [in]

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

nHeight [in]

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

Minimum supported server

Windows 2000 Server

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Filled Shapes Overview
Filled Shape Functions
Rectangle

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ