⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpoint.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CPoint.h,v 1.3 2002/08/06 20:10:46 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CPoint_h	// [
#define Included_CPoint_h

#include "pgpClassesConfig.h"

_PGP_BEGIN

// Class CPoint

class CPoint
{
public:
	CPoint(LONG x = 0, LONG y = 0);
	CPoint(POINT point);

	operator POINT&() {return mPoint;}
	operator const POINT&() const {return mPoint;}

	operator POINT *() {return &mPoint;}
	operator const POINT *() const {return &mPoint;}

	operator SIZE *()
	{
		return reinterpret_cast<SIZE *>(&mPoint);
	}

	operator const SIZE *() const
	{
		return reinterpret_cast<const SIZE *>(&mPoint);
	}

	const LONG&	X() const {return mPoint.x;}
	LONG&		X() {return mPoint.x;}

	const LONG&	Y() const {return mPoint.y;}
	LONG&		Y() {return mPoint.y;}

	void		Reset();

private:
	POINT	mPoint;
};


// Class CPoint member functions

inline 
CPoint::CPoint(LONG x, LONG y)
{
	mPoint.x = x;
	mPoint.y = y;
}

inline 
CPoint::CPoint(POINT point)
{
	mPoint = point;
}

inline 
void 
CPoint::Reset()
{
	mPoint.x = mPoint.y = 0;
}

_PGP_END

#endif	// ] Included_CPoint_h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -