Поделиться через


CRect::Width

Calculates the width of CRect by subtracting the left value from the right value.

int Width( ) const throw( );

Возвращаемое значение

The width of CRect.

Заметки

The width can be negative.

ПримечаниеПримечание.

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

Пример

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

int nWid = rect.Width();

// nWid is now 60
ASSERT(nWid == 60);   

Требования

Header: atltypes.h

См. также

Основные понятия

CRect Class

CRect Members

Hierarchy Chart

CRect::Height

CRect::Size

CRect::CenterPoint

CRect::IsRectEmpty

CRect::IsRectNull

CRect::NormalizeRect