s10_4doc.cpp

来自「四川大学教学的MFC的ppt 以及源代码」· C++ 代码 · 共 96 行

CPP
96
字号
// s10_4Doc.cpp : implementation of the CS10_4Doc class
//

#include "stdafx.h"
#include "s10_4.h"

#include "s10_4Doc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CS10_4Doc

IMPLEMENT_DYNCREATE(CS10_4Doc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CS10_4Doc construction/destruction

CS10_4Doc::CS10_4Doc()
{
	// TODO: add one-time construction code here
	m_sLogFont.lfCharSet			= ANSI_CHARSET;
	m_sLogFont.lfEscapement		= 0;
	m_sLogFont.lfHeight			= 60;
	m_sLogFont.lfItalic			= 0;
	m_sLogFont.lfOrientation	= 0;
	m_sLogFont.lfPitchAndFamily	= DEFAULT_PITCH;
	m_sLogFont.lfQuality		= DEFAULT_QUALITY;
	m_sLogFont.lfStrikeOut		= 0;
	m_sLogFont.lfUnderline		= 0;
	m_sLogFont.lfWeight			= FW_NORMAL;
	m_sLogFont.lfWidth			= 0;
	strcpy(m_sLogFont.lfFaceName, "times new roman");
}

CS10_4Doc::~CS10_4Doc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CS10_4Doc serialization

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

/////////////////////////////////////////////////////////////////////////////
// CS10_4Doc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CS10_4Doc commands

⌨️ 快捷键说明

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