home *** CD-ROM | disk | FTP | other *** search
/ Using Visual C++ 4 (Special Edition) / Using_Visual_C_4_Special_Edition_QUE_1996.iso / ch03 / ch3_menu / ch3mdoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-23  |  1.8 KB  |  83 lines

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