www.gusucode.com > VC++全局函数实现方法举例源码程序 > VC++全局函数实现方法举例源码程序/code/TestGlobalDoc.cpp
// TestGlobalDoc.cpp : implementation of the CTestGlobalDoc class // Download by http://www.NewXing.com #include "stdafx.h" #include "TestGlobal.h" #include "TestGlobalDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTestGlobalDoc IMPLEMENT_DYNCREATE(CTestGlobalDoc, CDocument) BEGIN_MESSAGE_MAP(CTestGlobalDoc, CDocument) //{{AFX_MSG_MAP(CTestGlobalDoc) // 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() ///////////////////////////////////////////////////////////////////////////// // CTestGlobalDoc construction/destruction CTestGlobalDoc::CTestGlobalDoc() { // TODO: add one-time construction code here } CTestGlobalDoc::~CTestGlobalDoc() { } BOOL CTestGlobalDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; _f.DocFution(); // TODO: add reinitialization code here // (SDI documents will reuse this document) return TRUE; } ///////////////////////////////////////////////////////////////////////////// // CTestGlobalDoc serialization void CTestGlobalDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CTestGlobalDoc diagnostics #ifdef _DEBUG void CTestGlobalDoc::AssertValid() const { CDocument::AssertValid(); } void CTestGlobalDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CTestGlobalDoc commands