다음을 통해 공유


CRect::IsRectNull

Determines whether the top, left, bottom, and right values of CRect are all equal to 0.

BOOL IsRectNull( ) const throw( );

Return Value

Nonzero if CRect's top, left, bottom, and right values are all equal to 0; otherwise 0.

Remarks

Differs from IsRectEmpty, which determines whether the rectangle is empty.

Example

CRect rectNone(0, 0, 0, 0);
CRect rectSome(35, 50, 135, 150);

ASSERT(rectNone.IsRectNull());
ASSERT(!rectSome.IsRectNull());

// note that null means _all_ zeros

CRect rectNotNull(0, 0, 35, 50);
ASSERT(!rectNotNull.IsRectNull());   

Requirements

Header: atltypes.h

See Also

Reference

CRect Class

Hierarchy Chart

CRect::IsRectEmpty

CRect::SetRectEmpty

Other Resources

CRect Members