CSize

Win32++

CSize Class

Description

A CSize can be used anywhere that a SIZE structure could be used.

CSize Members

CSize
CSize();
CSize(int CX, int CY);
CSize(SIZE sz);
CSize(POINT pt);
CSize(DWORD dw)
Various methods of constructing the CSize object.
operator LPSIZE()
operator LPSIZE();
Returns the pointer to the SIZE object associated with this CSize. operator ==
BOOL operator == (SIZE sz) const;
Returns TRUE if the co-ordinates of the source size and the CSize are equal. operator !=
BOOL operator != (SIZE sz) const;
Returns TRUE if the of the source size and the CSize are not equal. operator +=
void operator += (SIZE sz);
Adds the specified SIZE. operator -=
void operator -= (SIZE sz);
Subtracts the specified SIZE. operator -
CSize operator - () const;
Returns the unary minus (additive inverse). operator +
CSize operator + (SIZE sz) const;
CPoint operator + (POINT point) const;
CRect operator + (LPCRECT prc) const;
Adds the point and returns the value. operator -
CSize operator - (SIZE sz) const;
CPoint operator - (POINT point) const;
CRect operator - (LPCRECT prc) const;
Subtracts the point and returns the value. SetSize
void SetSize(int CX, int CY);
Sets the coordinates of the CSize.

Remarks

By default, the constructor sets all the size coordinates zero, but the CSize can also be constructed from two integers, a size, a point, or a dword.

The CSize class inherits from the SIZE structure.  As a result, the data members of the underlying SIZE struct are also accessible as data members.

Summary Information

Header file winutils.h
Win32/64 support Yes
WinCE support Yes