Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Graphics::DrawRectangle method draws a rectangle.
Status DrawRectangle(
[in] const Pen *pen,
[in] INT x,
[in] INT y,
[in] INT width,
[in] INT height
);
[in] pen
Type: const Pen*
Pointer to a Pen that is used to draw the rectangle.
[in] x
Type: INT
Integer that specifies the x-coordinate of the upper-left corner of the rectangle.
[in] y
Type: INT
Integer that specifies the y-coordinate of the upper-left corner of the rectangle.
[in] width
Type: INT
Integer that specifies the width of the rectangle.
[in] height
Type: INT
Integer that specifies the height of the rectangle.
Type: Status
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusgraphics.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today