CRect::BottomRight

座標時,就會傳回至 CRect包含的 CPoint 物件的參考。

CPoint& BottomRight( ) throw( ); 
const CPoint& BottomRight( ) const throw( );

傳回值

矩形右下角的座標。

備註

您可以使用這個函式以取得或設定矩形的右下角。設定這個角落使用這個函式在指派運算子左方的。

範例

// use BottomRight() to retrieve 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));   

需求

Header: atltypes.h

請參閱

參考

CRect 類別

階層架構圖

CRect::TopLeft

CPoint 類別

CRect::CenterPoint