CSize::CSize

CSize( );

CSize( int initCX, int initCY );

CSize( SIZE initSize );

CSize( POINT initPt );

CSize( DWORD dwSize );

Parameters

initCX

Sets the cx member for the CSize.

initCY

Sets the cy member for the CSize.

initSize

SIZE structure or CSize object used to initialize CSize.

initPt

POINT structure or CPoint object used to initialize CSize.

dwSize

DWORD used to initialize CSize. The low-order word is the cx member and the high-order word is the cy member.

Remarks

Constructs a CSize object. If no arguments are given, cx and cy members are not initialized.

Example

CSize szEmpty();
CSize szPointA(10, 25);

SIZE sz;
sz.cx = 10;
sz.cy = 25;
CSize szPointB(sz);

POINT pt;
pt.x = 10;
pt.y = 25;
CSize szPointC(pt);

CPoint ptObject(10, 25);
CSize szPointD(ptObject);   

DWORD dw = MAKELONG(10, 25);
CSize szPointE(dw);

ASSERT(szPointA == szPointB);
ASSERT(szPointB == szPointC);
ASSERT(szPointC == szPointD);
ASSERT(szPointD == szPointE);

CSize OverviewClass MembersHierarchy Chart