Rect::IsEmptyArea 方法會判斷此矩形是否空白。
Syntax
BOOL IsEmptyArea();
傳回值
類型: BOOL
如果矩形是空的,這個方法會傳回 TRUE;否則會傳回 FALSE。
備註
如果寬度或高度為零或更少,則矩形會定義為空白。
範例
下列範例會建立 Rect 對象、擴大矩形的維度,並判斷矩形是否空白。
VOID Example_IsEmptyArea(HDC hdc)
{
Graphics graphics(hdc);
// Create a Rect object, and inflate the dimensions.
Rect rect(50, 50, 200, 100);
rect.Inflate(0, -120);
// Determine whether the rectangle is empty.
if(rect.IsEmptyArea())
// The rectangle does not enclose any area.
}
規格需求
| 需求 | 值 |
|---|---|
| 最低支援的用戶端 | Windows XP、Windows 2000 Professional [僅限桌面應用程式] |
| 最低支援的伺服器 | Windows 2000 Server [僅限桌面應用程式] |
| 目標平台 | Windows |
| 標頭 | gdiplustypes.h (包含 Gdiplus.h) |
| 程式庫 | Gdiplus.lib |
| Dll | Gdiplus.dll |