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();Returns a pointer to the POINT associated with this object.
BOOL operator == (POINT pt) const;Returns TRUE if the co-ordinates of the source point and the CPoint are equal.
BOOL operator != (POINT pt) const;Returns TRUE if the of the source point and the CPoint are not equal.
void operator += (SIZE sz);
void operator += (POINT pt);Adds the specified point.
void operator -= (SIZE sz);
void operator -= (POINT pt);Subtracts the specified point.
CPoint operator - () const;Returns the unary minus (additive inverse).
CPoint operator + (SIZE sz) const;
CPoint operator + (POINT pt) const;
CRect operator + (LPCRECT prc) const;Adds the point and returns the value.
CPoint operator - (SIZE sz) const;
CPoint operator - (POINT pt) const;
CRect operator - (LPCRECT prc) const;Subtracts the point and returns the value.
void Offset(int dx, int dy);
void Offset(POINT pt);
void Offset(SIZE sz);Moves the CPoint by the specified offsets.
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 |