Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Size class

Applies to: desktop apps only

The Size class encapsulates a Width and Height dimension in a 2-D coordinate system.

Size has these types of members:

Constructors

The Size class has these constructors.

ConstructorDescription
Size::Size()

Creates a new Size object and initializes the members to zero. This is the default constructor.

Size::Size(INT,INT)

Creates a Size object and initializes its Width and Height data members.

Size::Size(Size&)

Creates a Size object and initializes its members by copying the members of another Size object.

 

Methods

The Size class has these methods.

MethodDescription
Size::Empty

The Size::Empty method determines whether a Size object is empty.

Size::Equals

The Size::Equals method determines whether two Size objects are equal.

Size::operator-(Size&)

The Size::operator- method subtracts the Width and Height data members of two Size objects.

Size::operator+(Size&)

The Size::operator+ method adds the Width and Height data members of two Size objects.

 

Data Members

The following table lists the members exposed by the Size object.

Data MembersTypeDescription
HeightINTVertical measurement of the Size object.
WidthINTHorizontal measurement of the Size object.

 

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2015 Microsoft