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

  1. // SDI2ViewsDoc.cpp : implementation of the CSDI2ViewsDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "SDI2Views.h"
  6.  
  7. #include "SDI2ViewsDoc.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. // CSDI2ViewsDoc
  17.  
  18. IMPLEMENT_DYNCREATE(CSDI2ViewsDoc, CDocument)
  19.  
  20. BEGIN_MESSAGE_MAP(CSDI2ViewsDoc, CDocument)
  21.     //{{AFX_MSG_MAP(CSDI2ViewsDoc)
  22.     //}}AFX_MSG_MAP
  23. END_MESSAGE_MAP()
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CSDI2ViewsDoc construction/destruction
  27.  
  28. CSDI2ViewsDoc::CSDI2ViewsDoc()
  29. {
  30. }
  31.  
  32. CSDI2ViewsDoc::~CSDI2ViewsDoc()
  33. {
  34. }
  35.  
  36. BOOL CSDI2ViewsDoc::OnNewDocument()
  37. {
  38.     if (!CDocument::OnNewDocument())
  39.         return FALSE;
  40.  
  41.     m_phrase.LoadString(IDS_WELCOME_MSG);
  42.     
  43.     m_color = RGB(0, 0, 0); // black
  44.  
  45.     return TRUE;
  46. }
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CSDI2ViewsDoc serialization
  50.  
  51. void CSDI2ViewsDoc::Serialize(CArchive& ar)
  52. {
  53.     if (ar.IsStoring())
  54.     {
  55.         // TODO: add storing code here
  56.     }
  57.     else
  58.     {
  59.         // TODO: add loading code here
  60.     }
  61. }
  62.  
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CSDI2ViewsDoc diagnostics
  65.  
  66. #ifdef _DEBUG
  67. void CSDI2ViewsDoc::AssertValid() const
  68. {
  69.     CDocument::AssertValid();
  70. }
  71.  
  72. void CSDI2ViewsDoc::Dump(CDumpContext& dc) const
  73. {
  74.     CDocument::Dump(dc);
  75. }
  76. #endif //_DEBUG
  77.  
  78. /////////////////////////////////////////////////////////////////////////////
  79. // CSDI2ViewsDoc commands
  80.  
  81.