次の方法で共有


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));   

必要条件

ヘッダー: atltypes.h

参照

関連項目

CRect クラス

階層図

CRect::TopLeft

CPoint クラス

CRect::CenterPoint