Rect::IsEmptyArea method (gdiplustypes.h)
The Rect::IsEmptyArea method determines whether this rectangle is empty.
Syntax
BOOL IsEmptyArea();
Return value
Type: BOOL
If the rectangle is empty, this method returns TRUE; otherwise, it returns FALSE.
Remarks
A rectangle is defined as empty if either the width or the height is zero or less.
Examples
The following example creates a Rect object, inflates the dimensions of the rectangle, and determines whether the rectangle is empty.
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.
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplustypes.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |