Freigeben über


CRect::Height

Calculates the height of CRect by subtracting the top value from the bottom value.

int Height( ) const throw( );

Return Value

The height of CRect.

Remarks

The resulting value can be negative.

Hinweis

The rectangle must be normalized or this function may fail. You can call NormalizeRect to normalize the rectangle before calling this function.

Example

CRect rect(20, 30, 80, 70);

int nHt = rect.Height();

// nHt is now 40
ASSERT(nHt == 40);   

Requirements

Header: atltypes.h

See Also

Concepts

CRect Class

CRect Members

Hierarchy Chart

CRect::Width

CRect::Size

CRect::CenterPoint

CRect::IsRectEmpty

CRect::IsRectNull

CRect::NormalizeRect