CPoint

Win32++

CPoint Class

Description

A CPoint can be used anywhere that a POINT structure could be used.

CPoint Members

CPoint
CPoint();
CPoint(int X, int Y);
CPoint(SIZE sz);
CPoint(POINT pt);
CPoint(DWORD dw);
Various methods of constructing a CPoint.
operator LPPOINT()
operator LPPOINT();
Returns a pointer to the POINT associated with this object. operator ==
BOOL operator == (POINT pt) const;
Returns TRUE if the co-ordinates of the source point and the CPoint are equal. operator !=
BOOL operator != (POINT pt) const;
Returns TRUE if the of the source point and the CPoint are not equal. operator +=
void operator += (SIZE sz);
void operator += (POINT pt);
Adds the specified point. operator -=
void operator -= (SIZE sz);
void operator -= (POINT pt);
Subtracts the specified point. operator -
CPoint operator - () const;
Returns the unary minus (additive inverse). operator +
CPoint operator + (SIZE sz) const;
CPoint operator + (POINT pt) const;
CRect operator + (LPCRECT prc) const;
Adds the point and returns the value. operator -
CPoint operator - (SIZE sz) const;
CPoint operator - (POINT pt) const;
CRect operator - (LPCRECT prc) const;
Subtracts the point and returns the value. Offset
void Offset(int dx, int dy);
void Offset(POINT pt);
void Offset(SIZE sz);
Moves the CPoint by the specified offsets. SetPoint
void SetPoint(int X, int Y);
Sets the coordinates of the CPoint.

Remarks

By default, the constructor sets all the size coordinates zero, but the CPoint can also be constructed from two integers, a size, a point, or a dword.

The CPoint class inherits from the POINT structure.  As a result, the data members of the underlying POINT struct are also accessible as data members.

Summary Information

Header file winutils.h
Win32/64 support Yes
WinCE support Yes