www.gusucode.com > VC++编写一个CDC文字处理程序的代码-源码程序 > VC++编写一个CDC文字处理程序的代码-源码程序/code/TextDoc.cpp
// TextDoc.cpp : implementation of the CTextDoc class // Download by http://www.NewXing.com #include "stdafx.h" #include "Text.h" #include "TextDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTextDoc IMPLEMENT_DYNCREATE(CTextDoc, CDocument) BEGIN_MESSAGE_MAP(CTextDoc, CDocument) //{{AFX_MSG_MAP(CTextDoc) // 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() ///////////////////////////////////////////////////////////////////////////// // CTextDoc construction/destruction CTextDoc::CTextDoc() { // TODO: add one-time construction code here } CTextDoc::~CTextDoc() { } BOOL CTextDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CTextDoc serialization void CTextDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CTextDoc diagnostics #ifdef _DEBUG void CTextDoc::AssertValid() const { CDocument::AssertValid(); } void CTextDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CTextDoc commands