CRect::IsRectEmpty
BOOLIsRectEmpty()const;
Return Value
Nonzero if CRect is empty; 0 if CRect is not empty.
Remarks
Determines whether CRect is empty. A rectangle is empty if the width and/or height are 0 or negative. Differs from IsRectNull, which determines whether all coordinates of the rectangle are zero.
Note The rectangle must be normalized or this function may fail. You can call NormalizeRect to normalize the rectangle before calling this function.
Example
CRect rectNone(0, 0, 0, 0);
CRect rectSome(35, 50, 135, 150);
ASSERT(rectNone.IsRectEmpty());
ASSERT(!rectSome.IsRectEmpty());
CRect rectEmpty(35, 35, 35, 35);
ASSERT(rectEmpty.IsRectEmpty());
CRect Overview | Class Members | Hierarchy Chart
See Also CRect::IsRectNull, CRect::SetRectEmpty, CRect::NormalizeRect,