exp22_1doc.cpp

来自「mfc实验例题也是高教得配套资料 刚找到得 这部分应该是自学的内容」· C++ 代码 · 共 96 行

CPP
96
字号
// Exp22_1Doc.cpp : implementation of the CExp22_1Doc class
//

#include "stdafx.h"
#include "Exp22_1.h"

#include "Exp22_1Doc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CExp22_1Doc

IMPLEMENT_DYNCREATE(CExp22_1Doc, CDocument)

BEGIN_MESSAGE_MAP(CExp22_1Doc, CDocument)
	//{{AFX_MSG_MAP(CExp22_1Doc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CExp22_1Doc construction/destruction

CExp22_1Doc::CExp22_1Doc()
{
	// TODO: add one-time construction code here

}

CExp22_1Doc::~CExp22_1Doc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CExp22_1Doc serialization

void CExp22_1Doc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
	m_elemList.Serialize(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CExp22_1Doc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CExp22_1Doc commands

void CExp22_1Doc::DeleteContents() 
{
	// TODO: Add your specialized code here and/or call the base class
	while(!m_elemList.IsEmpty()){
		delete m_elemList.RemoveHead();
	}
	
	CDocument::DeleteContents();
}

⌨️ 快捷键说明

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