Share via


CRect::BottomRight

CPoint&BottomRight();

const CPoint& BottomRight( ) const;

Return Value

The coordinates of the bottom-right corner of the rectangle.

Remarks

The coordinates are returned as a reference to a CPoint object that is contained in CRect.

You can use this function to either get or set the bottom-right corner of the rectangle. Set the corner by using this function on the left side of the assignment operator.

Example

// use BottomRight() to retreive the bottom
// right point

CRect rect(210, 150, 350, 900);
CPoint ptDown;

ptDown = rect.BottomRight();

// ptDown is now set to (350, 900)
ASSERT(ptDown == CPoint(350, 900));

// or, use BottomRight() to set the bottom
// right point

CRect rect2(10, 10, 350, 350);
CPoint ptLow(180, 180);

rect2.BottomRight() = ptLow;

// rect2 is now (10, 10, 180, 180)
ASSERT(rect2 == CRect(10, 10, 180, 180));

CRect OverviewClass MembersHierarchy Chart

See Also   CRect::TopLeft, CPoint, CRect::CenterPoint