home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c07 / mdi2views / mdi2viewsdoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.7 KB  |  81 lines

  1. // MDI2ViewsDoc.cpp : implementation of the CMDI2ViewsDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MDI2Views.h"
  6.  
  7. #include "MDI2ViewsDoc.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CMDI2ViewsDoc
  17.  
  18. IMPLEMENT_DYNCREATE(CMDI2ViewsDoc, CDocument)
  19.  
  20. BEGIN_MESSAGE_MAP(CMDI2ViewsDoc, CDocument)
  21.     //{{AFX_MSG_MAP(CMDI2ViewsDoc)
  22.         // NOTE - the ClassWizard will add and remove mapping macros here.
  23.         //    DO NOT EDIT what you see in these blocks of generated code!
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CMDI2ViewsDoc construction/destruction
  29.  
  30. CMDI2ViewsDoc::CMDI2ViewsDoc()
  31. {
  32. }
  33.  
  34. CMDI2ViewsDoc::~CMDI2ViewsDoc()
  35. {
  36. }
  37.  
  38. BOOL CMDI2ViewsDoc::OnNewDocument()
  39. {
  40.     if (!CDocument::OnNewDocument())
  41.         return FALSE;
  42.  
  43.     m_phrase.LoadString(IDS_WELCOME_MSG);
  44.     m_color = 0;
  45.  
  46.     return TRUE;
  47. }
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CMDI2ViewsDoc serialization
  51.  
  52. void CMDI2ViewsDoc::Serialize(CArchive& ar)
  53. {
  54.     if (ar.IsStoring())
  55.     {
  56.         // TODO: add storing code here
  57.     }
  58.     else
  59.     {
  60.         // TODO: add loading code here
  61.     }
  62. }
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CMDI2ViewsDoc diagnostics
  66.  
  67. #ifdef _DEBUG
  68. void CMDI2ViewsDoc::AssertValid() const
  69. {
  70.     CDocument::AssertValid();
  71. }
  72.  
  73. void CMDI2ViewsDoc::Dump(CDumpContext& dc) const
  74. {
  75.     CDocument::Dump(dc);
  76. }
  77. #endif //_DEBUG
  78.  
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CMDI2ViewsDoc commands
  81.