POINT和CPoint有甚么区别!?-实例分析-华软网
来源:百度文库 编辑:神马文学网 时间:2024/04/30 02:25:57
C/C++ code
//POINT是个简单的结构
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;//CPoint类复杂一些
class CPoint : public tagPOINT
{
public:
// Constructors // create an uninitialized point
CPoint();
// 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上都有。 .
编程论坛 6 个网友回答: Point 是个结构
C/C++ code
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
CPoint 是封装的一个类
C/C++ code
class CPoint : public tagPOINT
{
…………
}
欢迎转载,但请保留出处,本文章转自[华软网] 原文链接:http://www.huarw.com/program/vc/vc02/200907/1714885.html
//POINT是个简单的结构
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;//CPoint类复杂一些
class CPoint : public tagPOINT
{
public:
// Constructors // create an uninitialized point
CPoint();
// 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上都有。 .
编程论坛 6 个网友回答: Point 是个结构
C/C++ code
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
CPoint 是封装的一个类
C/C++ code
class CPoint : public tagPOINT
{
…………
}
欢迎转载,但请保留出处,本文章转自[华软网] 原文链接:http://www.huarw.com/program/vc/vc02/200907/1714885.html
POINT和CPoint有甚么区别!?-实例分析-华软网
南京seo:深入分析目标关键词和长尾关键词的区别有哪些
实例分析相同名字为什么会有不同命运 ?
股票K线组合实例分析:支持和阻挡
水和火烫伤的区别、有区别吗?
PDA和智能手机有什么区别
博客和论坛究竟有什么区别?
钓鱼和泡吧有什么区别?
美国众议院和参议院有什么区别
牛市和熊市有什么区别?
牛市和熊市有什么区别?
编著和专著有什么区别
美国众议院和参议院有什么区别
长石和石英有什么区别
草甸和草原有什么区别
男人和女人做梦有什么区别?
地方公务员和国家公务员有何区别?
Cstr 和Str有什么区别
肾亏和肾虚有什么区别_
什么是AGPS,和GPS有什么区别??
鸡精和味精有什么区别
鸡精和味精有什么区别
“做客”和“作客”有区别吗?
图标和位图有什么区别?