CRect::Size

CSize Size( ) const;

Return Value

A CSize object that contains the size of CRect.

Remarks

The cx and cy members of the return value contain the height and width of CRect. Either the height or width can be negative.

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 rect(10, 10, 50, 50);
CSize sz = rect.Size();
ASSERT(sz.cx == 40 && sz.cy == 40);

CRect OverviewClass MembersHierarchy Chart

See Also   CRect::Height, CRect::Width, CRect::IsRectEmpty, CRect::IsRectNull, CRect::NormalizeRect