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

📄 object1.cpp

📁 Viewdraw 30
💻 CPP
字号:
// Object1.cpp: implementation of the CObject1 class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "test1.h"
#include "Object1.h"


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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

IMPLEMENT_SERIAL(CObject1, CObject,1);

//IMPLEMENT_DYNCREATE
CObject1::CObject1()
{
	m_nSelect=1;
}

CObject1::~CObject1()
{

}

void CObject1::Draw(CDC *pDC)
{
	
}

void CObject1::GetPoint(CPoint pt1, CPoint pt2)
{	

}

void CObject1::Serialize(CArchive &ar)
{	

	CObject::Serialize (ar);
	
	if (ar.IsStoring())
	{
		ar <<m_nPenType<<m_nPenWidth<<m_crColor;
	}
	else 
	{
		ar >>m_nPenType>>m_nPenWidth>>m_crColor;
	}
}


void CObject1::PassWord(int PenType,int PenWidth,COLORREF Color,int Select)
{
    m_nPenType=PenType;
	m_nPenWidth=PenWidth;
	m_crColor=Color;
	m_nSelect=Select;
}

void CObject1::GetColor()
{
	CColorDialog dlg;
	if (dlg.DoModal() == IDOK)
	{
		m_crColor = dlg.GetColor();
	}

}
CPoint CObject1::SetFirstPoint()
{
	return (0,0);
}

CPoint CObject1::SetEndPoint()
{
	return (0,0);
}

void CObject1::GetPoint2(int x1, int y1, int x2, int y2)
{
	
}

⌨️ 快捷键说明

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