ReactOS 0.4.15-dev-8408-g466a198
CSize Class Reference

#include <atltypes.h>

Inheritance diagram for CSize:
Collaboration diagram for CSize:

Public Member Functions

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

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 ( )
inlinenoexcept

Definition at line 135 of file atltypes.h.

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

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

◆ CSize() [2/5]

CSize::CSize ( int  initCX,
int  initCY 
)
inlinenoexcept

Definition at line 140 of file atltypes.h.

141 {
142 cx = initCX;
143 cy = initCY;
144 }

◆ CSize() [3/5]

CSize::CSize ( SIZE  initSize)
inlinenoexcept

Definition at line 146 of file atltypes.h.

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

◆ CSize() [4/5]

CSize::CSize ( POINT  initPt)
inlinenoexcept

Definition at line 151 of file atltypes.h.

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

◆ CSize() [5/5]

CSize::CSize ( DWORD  dwSize)
inlinenoexcept

Definition at line 156 of file atltypes.h.

157 {
158 cx = LOWORD(dwSize);
159 cy = HIWORD(dwSize);
160 }
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247

Member Function Documentation

◆ operator!=()

BOOL CSize::operator!= ( SIZE  size) const
inlinenoexcept

Definition at line 167 of file atltypes.h.

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

◆ operator+() [1/3]

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

Definition at line 610 of file atltypes.h.

611{
612 CRect r(lpRect);
613 r += *this;
614 return r;
615}
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

◆ operator+() [2/3]

CPoint CSize::operator+ ( POINT  point) const
inlinenoexcept

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:330
LONG x
Definition: windef.h:329

◆ operator+() [3/3]

CSize CSize::operator+ ( SIZE  size) const
inlinenoexcept

Definition at line 184 of file atltypes.h.

185 {
186 return CSize(cx + size.cx, cy + size.cy);
187 }
CSize() noexcept
Definition: atltypes.h:135

◆ operator+=()

void CSize::operator+= ( SIZE  size)
inlinenoexcept

Definition at line 172 of file atltypes.h.

173 {
174 cx += size.cx;
175 cy += size.cy;
176 }

◆ operator-() [1/4]

CSize CSize::operator- ( ) const
inlinenoexcept

Definition at line 208 of file atltypes.h.

209 {
210 return CSize(-cx, -cy);
211 }

◆ operator-() [2/4]

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

Definition at line 617 of file atltypes.h.

618{
619 CRect r(lpRect);
620 r -= *this;
621 return r;
622}

◆ operator-() [3/4]

CPoint CSize::operator- ( POINT  point) const
inlinenoexcept

Definition at line 201 of file atltypes.h.

202 {
203 return CPoint(cx - point.x, cy - point.y);
204 }

◆ operator-() [4/4]

CSize CSize::operator- ( SIZE  size) const
inlinenoexcept

Definition at line 196 of file atltypes.h.

197 {
198 return CSize(cx - size.cx, cy - size.cy);
199 }

◆ operator-=()

void CSize::operator-= ( SIZE  size)
inlinenoexcept

Definition at line 178 of file atltypes.h.

179 {
180 cx -= size.cx;
181 cy -= size.cy;
182 }

◆ operator==()

BOOL CSize::operator== ( SIZE  size) const
inlinenoexcept

Definition at line 162 of file atltypes.h.

163 {
164 return (size.cx == cx && size.cy == cy);
165 }

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