RECT
構造体(tagRECT
)またはaCRect
をに変換する最も簡単な方法は何Gdiplus::Rect
ですか?
Gdiplus::Rect tmpRect(rect.top, rect.left, rect.Width(), rect.Height());
動作しますが、多くのタイピングです。
Gdiplus :: Rectのインターフェースに便利なコンストラクターがない場合は、独自の関数を一度作成すれば、どこでも使用できます。
Gdiplus::Rect CopyRect(const RECT &rect)
{
return Gdiplus::Rect(rect.left, rect.top, rect.Width(), rect.Height());
}
署名はRect([in] INT x, [in] INT y, [in] INT width, [in] INT height);
そうあるべきです
Gdiplus::Rect CopyRect(RECT &rect)
{
return Gdiplus::Rect(rect.left, rect.top, rect.Width(), rect.Height());
}