www.gusucode.com > 《C++高级语言程序设计》PPT及全书例子源代码-源码程序 > 《C++高级语言程序设计》PPT及全书例子源代码-源码程序/code/C++例题程序/第8章/s8_9/s8_9Doc.cpp

    //Download by http://www.NewXing.com
// s8_9Doc.cpp : implementation of the CS8_9Doc class
//

#include "stdafx.h"
#include "s8_9.h"

#include "s8_9Doc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CS8_9Doc

IMPLEMENT_DYNCREATE(CS8_9Doc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CS8_9Doc construction/destruction

CS8_9Doc::CS8_9Doc()
{
	// TODO: add one-time construction code here
	m_strText.Empty();	//初始化文本串为空
}

CS8_9Doc::~CS8_9Doc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CS8_9Doc serialization

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

/////////////////////////////////////////////////////////////////////////////
// CS8_9Doc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CS8_9Doc commands