Share via


Size::Empty メソッド (gdiplustypes.h)

Size::Empty メソッドは、Size オブジェクトが空かどうかを判断します。

構文

BOOL Empty();

戻り値

種類: BOOL

WidthHeight の両方のデータ メンバーが 0 の場合、このメソッドは TRUE を返します。それ以外の場合は、FALSE を返します。

解説

WidthHeight の両方のデータ メンバーが 0 の場合、Size オブジェクトは空として定義されます。

Rect rect(50, 50, 100, 200);
Size size;

rect.Inflate(-50, -100);
rect.GetSize(&size);

if(size.Empty())
{
   // The width and height are both 0.
}

要件

   
サポートされている最小のクライアント Windows XP、Windows 2000 Professional [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows 2000 Server [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー gdiplustypes.h (Gdiplus.h を含む)
Library Gdiplus.lib
[DLL] Gdiplus.dll

関連項目

Rect

[サイズ]

Sizef