CSize::operator -

CSize operator -( SIZE size ) const;

CPoint operator -( POINT point ) const;

CRect operator -( const RECT* lpRect ) const;

CSize operator -( ) const;

Remarks

The first three of these operators subtract this CSize value to the value of parameter. The fourth operator, the unary minus, changes the sign of the CSize value. See the following descriptions of the individual operators:

Example

CSize sz1(100, 100);
CSize sz2( 50,  25);
CSize szOut;

szOut = sz1 - sz2;

CSize szResult(50, 75);
ASSERT(szOut == szResult);

// works with SIZE, too

sz1 = CSize(100, 100);
SIZE sz3;
sz3.cx = 50;
sz3.cy = 25;

szOut = sz1 - sz3;
ASSERT(szOut == szResult);

CSize OverviewClass MembersHierarchy Chart

See Also   CPoint::operator -, CRect::operator -