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

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