POINT和CPoint有甚么区别!?
1个回答
展开全部
typedef struct tagPOINT{LONG x;LONG y;} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;//CPoint类复杂一些
class CPoint : public tagPOINT{public:// Constructors // create an uninitialized pointCPoint();// create from two integers
CPoint(int initX, int initY);
// create from another point
CPoint(POINT initPt);
// create from a size
CPoint(SIZE inITSize);
// create from a dword: x = LOWORD(dw) y = HIWORD(dw)
CPoint(DWORD dwPoint);// Operations// translate the point
void Offset(int xOffset, int yOffset);
void Offset(POINT point);
void Offset(SIZE size); BOOL operator==(POINT point) const;
BOOL operator!=(POINT point) const;
void operator+=(SIZE size);
void operator-=(SIZE size);
void operator+=(POINT point);
void operator-=(POINT point);// Operators returning CPoint values
CPoint operator+(SIZE size) const;
CPoint operator-(SIZE size) const;
CPoint operator-() const;
CPoint operator+(POINT point) const;// Operators returning CSize values
CSize operator-(POINT point) const;// Operators returning CRect values
CRect operator+(const RECT* lpRect) const;
CRect operator-(const RECT* lpRect) const;};.
编程论坛 5 个网友回答: MSDN上都有。 .
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询