次の方法で共有


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

その他の技術情報

CRect のメンバー