mypoint1.cpp

来自「用VC编写的一个单文档程序」· C++ 代码 · 共 55 行

CPP
55 行
字号
// Mypoint1.cpp: implementation of the CMypoint class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "VCexpshi10.h"
#include "Mypoint1.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CMypoint,CObject,0);
CMypoint::CMypoint()
{

	x=0;
	y=0;
	r=0;
}

CMypoint::~CMypoint()
{

}



CMypoint::CMypoint(int a, int b, int r1)
{
	x=a;
	y=b;
	r=r1;
}

void CMypoint::Serializa(CArchive &ar)
{

	if(ar.IsStoring())
		ar<<x<<y<<r;
	else
		ar>>r>>y>>x;
}

void CMypoint::Drow(CDC *pdc)
{

	pdc->Ellipse(x-r,y-r,x+r,y+r);
}

⌨️ 快捷键说明

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