gusucode.com > 基于VC编程界面编程高级应用技术源码程序 > VC界面编程高级应用技术/code/1/DevDemo/Doc.cpp
// Doc.cpp : implementation file // #include "stdafx.h" #include "DevDemo.h" #include "Doc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMyDoc IMPLEMENT_DYNCREATE(CMyDoc, CDocument) CMyDoc::CMyDoc() { } BOOL CMyDoc::OnNewDocument() { if (!CDocument::OnNewDocument()) return FALSE; return TRUE; } CMyDoc::~CMyDoc() { } BEGIN_MESSAGE_MAP(CMyDoc, CDocument) //{{AFX_MSG_MAP(CMyDoc) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMyDoc diagnostics #ifdef _DEBUG void CMyDoc::AssertValid() const { CDocument::AssertValid(); } void CMyDoc::Dump(CDumpContext& dc) const { CDocument::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMyDoc serialization void CMyDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here } else { // TODO: add loading code here } } ///////////////////////////////////////////////////////////////////////////// // CMyDoc commands