home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c06 / tabbed / tabbedoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.9 KB  |  84 lines

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