draw1doc.cpp

来自「用c++编写的简单的绘图程序」· C++ 代码 · 共 88 行

CPP
88
字号
// DRAW1Doc.cpp : implementation of the CDRAW1Doc class
//

#include "stdafx.h"
#include "DRAW1.h"

#include "DRAW1Doc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDRAW1Doc

IMPLEMENT_DYNCREATE(CDRAW1Doc, CDocument)

BEGIN_MESSAGE_MAP(CDRAW1Doc, CDocument)
	//{{AFX_MSG_MAP(CDRAW1Doc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDRAW1Doc construction/destruction

CDRAW1Doc::CDRAW1Doc()
{
	// TODO: add one-time construction code here
	m_sizeDoc=CSize(1000,1000);

}

CDRAW1Doc::~CDRAW1Doc()
{
}

BOOL CDRAW1Doc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CDRAW1Doc serialization

void CDRAW1Doc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
		ar<<m_sizeDoc;
	}
	else
	{
		// TODO: add loading code here
		ar>>m_sizeDoc;
	}
}

/////////////////////////////////////////////////////////////////////////////
// CDRAW1Doc diagnostics

#ifdef _DEBUG
void CDRAW1Doc::AssertValid() const
{
	CDocument::AssertValid();
}

void CDRAW1Doc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CDRAW1Doc commands

⌨️ 快捷键说明

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