ReactOS  0.4.13-dev-544-gede3fdd
CSize Class Reference

#include <atltypes.h>

Inheritance diagram for CSize:
Collaboration diagram for CSize:

Public Member Functions

 CSize () throw ()
 
 CSize (int initCX, int initCY) throw ()
 
 CSize (SIZE initSize) throw ()
 
 CSize (POINT initPt) throw ()
 
 CSize (DWORD dwSize) throw ()
 
BOOL operator== (SIZE size) const throw ()
 
BOOL operator!= (SIZE size) const throw ()
 
void operator+= (SIZE size) throw ()
 
void operator-= (SIZE size) throw ()
 
CSize operator+ (SIZE size) const throw ()
 
CPoint operator+ (POINT point) const throw ()
 
CRect operator+ (const RECT *lpRect) const throw ()
 
CSize operator- (SIZE size) const throw ()
 
CPoint operator- (POINT point) const throw ()
 
CRect operator- (const RECT *lpRect) const throw ()
 
CSize operator- () const throw ()
 

Additional Inherited Members

- Public Attributes inherited from tagSIZE
LONG cx
 
LONG cy
 

Detailed Description

Definition at line 132 of file atltypes.h.

Constructor & Destructor Documentation

◆ CSize() [1/5]

CSize::CSize ( )
throw (
)
inline

Definition at line 135 of file atltypes.h.

136  {
137  cx = cy = 0;
138  }
LONG cx
Definition: windef.h:319
LONG cy
Definition: windef.h:320

Referenced by operator+(), and operator-().

◆ CSize() [2/5]

CSize::CSize ( int  initCX,
int  initCY 
)
throw (
)
inline

Definition at line 140 of file atltypes.h.

141  {
142  cx = initCX;
143  cy = initCY;
144  }
LONG cx
Definition: windef.h:319
LONG cy
Definition: windef.h:320

◆ CSize() [3/5]

CSize::CSize ( SIZE  initSize)
throw (
)
inline

Definition at line 146 of file atltypes.h.

147  {
148  *((SIZE*)this) = initSize;
149  }

◆ CSize() [4/5]

CSize::CSize ( POINT  initPt)
throw (
)
inline

Definition at line 151 of file atltypes.h.

152  {
153  *((POINT*)this) = initPt;
154  }

◆ CSize() [5/5]

CSize::CSize ( DWORD  dwSize)
throw (
)
inline

Definition at line 156 of file atltypes.h.

157  {
158  cx = LOWORD(dwSize);
159  cy = HIWORD(dwSize);
160  }
LONG cx
Definition: windef.h:319
#define HIWORD(l)
Definition: typedefs.h:246
LONG cy
Definition: windef.h:320
#define LOWORD(l)
Definition: pedump.c:82
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

Member Function Documentation

◆ operator!=()

BOOL CSize::operator!= ( SIZE  size) const
throw (
)
inline

Definition at line 167 of file atltypes.h.

168  {
169  return !(*this == size);
170  }
GLsizeiptr size
Definition: glext.h:5919

◆ operator+() [1/3]

CSize CSize::operator+ ( SIZE  size) const
throw (
)
inline

Definition at line 184 of file atltypes.h.

185  {
186  return CSize(cx + size.cx, cy + size.cy);
187  }
LONG cx
Definition: windef.h:319
GLsizeiptr size
Definition: glext.h:5919
CSize()
Definition: atltypes.h:135
LONG cy
Definition: windef.h:320

◆ operator+() [2/3]

CPoint CSize::operator+ ( POINT  point) const
throw (
)
inline

Definition at line 189 of file atltypes.h.

190  {
191  return CPoint(cx + point.x, cy + point.y);
192  }
POINTL point
Definition: edittest.c:50
LONG y
Definition: windef.h:315
LONG cx
Definition: windef.h:319
LONG x
Definition: windef.h:314
LONG cy
Definition: windef.h:320

◆ operator+() [3/3]

CRect CSize::operator+ ( const RECT lpRect) const
throw (
)

Definition at line 553 of file atltypes.h.

554 {
555  CRect r(lpRect);
556  r += *this;
557  return r;
558 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

◆ operator+=()

void CSize::operator+= ( SIZE  size)
throw (
)
inline

Definition at line 172 of file atltypes.h.

173  {
174  cx += size.cx;
175  cy += size.cy;
176  }
LONG cx
Definition: windef.h:319
GLsizeiptr size
Definition: glext.h:5919
LONG cy
Definition: windef.h:320

◆ operator-() [1/4]

CSize CSize::operator- ( SIZE  size) const
throw (
)
inline

Definition at line 196 of file atltypes.h.

197  {
198  return CSize(cx - size.cx, cy - size.cy);
199  }
LONG cx
Definition: windef.h:319
GLsizeiptr size
Definition: glext.h:5919
CSize()
Definition: atltypes.h:135
LONG cy
Definition: windef.h:320

◆ operator-() [2/4]

CPoint CSize::operator- ( POINT  point) const
throw (
)
inline

Definition at line 201 of file atltypes.h.

202  {
203  return CPoint(cx - point.x, cy - point.y);
204  }
POINTL point
Definition: edittest.c:50
LONG y
Definition: windef.h:315
LONG cx
Definition: windef.h:319
LONG x
Definition: windef.h:314
LONG cy
Definition: windef.h:320

◆ operator-() [3/4]

CRect CSize::operator- ( const RECT lpRect) const
throw (
)

Definition at line 560 of file atltypes.h.

561 {
562  CRect r(lpRect);
563  r -= *this;
564  return r;
565 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

◆ operator-() [4/4]

CSize CSize::operator- ( ) const
throw (
)
inline

Definition at line 208 of file atltypes.h.

209  {
210  return CSize(-cx, -cy);
211  }
LONG cx
Definition: windef.h:319
CSize()
Definition: atltypes.h:135
LONG cy
Definition: windef.h:320

◆ operator-=()

void CSize::operator-= ( SIZE  size)
throw (
)
inline

Definition at line 178 of file atltypes.h.

179  {
180  cx -= size.cx;
181  cy -= size.cy;
182  }
LONG cx
Definition: windef.h:319
GLsizeiptr size
Definition: glext.h:5919
LONG cy
Definition: windef.h:320

◆ operator==()

BOOL CSize::operator== ( SIZE  size) const
throw (
)
inline

Definition at line 162 of file atltypes.h.

163  {
164  return (size.cx == cx && size.cy == cy);
165  }
LONG cx
Definition: windef.h:319
GLsizeiptr size
Definition: glext.h:5919
LONG cy
Definition: windef.h:320

The documentation for this class was generated from the following file: