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.

Point class

Applies to: desktop apps only

The Point class encapsulates a point in a 2-D coordinate system.

Point has these types of members:

Constructors

The Point class has these constructors.

ConstructorDescription
Point::Point()

Creates a Point object and initializes the X and Y data members to zero. This is the default constructor.

Point::Point(INT,INT)

Creates a Point object using two integers to initialize the X and Y data members.

Point::Point(Point&)

Creates a new Point object and copies the data members from another Point object.

Point::Point(Size&)

Creates a Point object using a Size object to initialize the X and Y data members.

 

Methods

The Point class has these methods.

MethodDescription
Point::Equals

The Point::Equals method determines whether two Point objects are equal. Two points are considered equal if they have the same X and Y data members.

Point::operator-(Point&)

The Point::operator- method subtracts the X and Y data members of two Point objects.

Point::operator+(Point&)

The Point::operator+ method adds the X and Y data members of two Point objects.

 

Data Members

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

Data MembersTypeDescription
XINTHorizontal coordinate.
YINTVertical coordinate.

 

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2014 Microsoft