CRect::IsRectEmpty
Determines whether CRect is empty.
BOOL IsRectEmpty( ) const throw( );
Возвращаемое значение
Nonzero if CRect is empty; 0 if CRect is not 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.
Примечание. |
---|
The rectangle must be normalized or this function may fail. You can call NormalizeRect to normalize the rectangle before calling this function. |
Пример
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());
Требования
Header: atltypes.h