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

📄 s9_1doc.cpp

📁 四川大学教学的MFC的ppt 以及源代码
💻 CPP
字号:
// s9_1Doc.cpp : implementation of the CS9_1Doc class
//

#include "stdafx.h"
#include "s9_1.h"

#include "s9_1Doc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CS9_1Doc

IMPLEMENT_DYNCREATE(CS9_1Doc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CS9_1Doc construction/destruction

CS9_1Doc::CS9_1Doc()
{
	// TODO: add one-time construction code here
	m_strText.Empty();		//初始化字符串变量为空
}

CS9_1Doc::~CS9_1Doc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CS9_1Doc serialization

void CS9_1Doc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
		ar << m_strText;			// 将文档存入磁盘
	}
	else
	{
		// TODO: add loading code here
		ar >> m_strText;			// 从磁盘中读出文档
	}
}

/////////////////////////////////////////////////////////////////////////////
// CS9_1Doc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CS9_1Doc commands

⌨️ 快捷键说明

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