Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Rect.GetBottom method

Applies to: desktop apps only

The Rect::GetBottom method gets the y-coordinate of the bottom edge of the rectangle.

Syntax

INT GetBottom() const;

Parameters

This method has no parameters.

Return value

Type:

Type: INT

This method returns the y-coordinate of the bottom edge of the rectangle.

Examples

The following example creates a Rect object, gets the bottom edge of the rectangle, and then draws the rectangle and a line at the bottom of the rectangle.


VOID Example_GetBottom(HDC hdc)
{
   Graphics graphics(hdc);

   // Create a rect object, and get the bottom edge of the rectangle.
   Rect rect(50, 50, 200, 100);
   INT bottom = rect.GetBottom();

   // Draw the rectangle with a thick green pen.
   Pen greenPen(Color(255, 0, 255, 0), 15);
   graphics.DrawRectangle(&greenPen, rect);

   // Draw a thin black line at the bottom of the rectangle.
   Pen blackPen(Color(255, 0, 0, 0), 1);
   graphics.DrawLine(&blackPen, 0, bottom, 300, bottom);
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplustypes.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Rect
Rect::GetLeft
Rect::GetRight
Rect::GetTop
RectF
Using a Pen to Draw Lines and Rectangles
Pens, Lines, and Rectangles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2015 Microsoft