home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / formdemo / formddoc.cpp next >
Encoding:
C/C++ Source or Header  |  1995-11-30  |  1.8 KB  |  83 lines

  1. // FormDDoc.cpp : implementation of the CFormDemoDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "FormDemo.h"
  6.  
  7. #include "FormDDoc.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. // CFormDemoDoc
  17.  
  18. IMPLEMENT_DYNCREATE(CFormDemoDoc, CDocument)
  19.  
  20. BEGIN_MESSAGE_MAP(CFormDemoDoc, CDocument)
  21.    //{{AFX_MSG_MAP(CFormDemoDoc)
  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. // CFormDemoDoc construction/destruction
  29.  
  30. CFormDemoDoc::CFormDemoDoc()
  31. {
  32.    // TODO: add one-time construction code here
  33.  
  34. }
  35.  
  36. CFormDemoDoc::~CFormDemoDoc()
  37. {
  38. }
  39.  
  40. BOOL CFormDemoDoc::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. // CFormDemoDoc serialization
  53.  
  54. void CFormDemoDoc::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. // CFormDemoDoc diagnostics
  68.  
  69. #ifdef _DEBUG
  70. void CFormDemoDoc::AssertValid() const
  71. {
  72.    CDocument::AssertValid();
  73. }
  74.  
  75. void CFormDemoDoc::Dump(CDumpContext& dc) const
  76. {
  77.    CDocument::Dump(dc);
  78. }
  79. #endif //_DEBUG
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CFormDemoDoc commands
  83.