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

📄 mdocdemodoc.cpp

📁 VC++6开发指南的源代码第7章-第11章
💻 CPP
字号:
// MDocDemoDoc.cpp : implementation of the CMDocDemoDoc class
//

#include "stdafx.h"
#include "MDocDemo.h"

#include "MDocDemoDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMDocDemoDoc

IMPLEMENT_DYNCREATE(CMDocDemoDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CMDocDemoDoc construction/destruction

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

}

CMDocDemoDoc::~CMDocDemoDoc()
{
}

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

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)
	m_str="多文档应用程序实例!";//输出文本
	CFontDialog dlg;//字体对话框
	dlg.GetCurrentFont(&m_lf);
	if(dlg.DoModal()==IDOK)//显示对话框
		dlg.GetCurrentFont(&m_lf);//获取用户设置的字体信息
	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CMDocDemoDoc serialization

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

/////////////////////////////////////////////////////////////////////////////
// CMDocDemoDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CMDocDemoDoc commands

⌨️ 快捷键说明

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