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

  1. // diffDoc.cpp : implementation of the CDiffDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "diff.h"
  6.  
  7. #include "diffDoc.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CDiffDoc
  16.  
  17. IMPLEMENT_DYNCREATE(CDiffDoc, CDocument)
  18.  
  19. BEGIN_MESSAGE_MAP(CDiffDoc, CDocument)
  20.     //{{AFX_MSG_MAP(CDiffDoc)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code!
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CDiffDoc construction/destruction
  28.  
  29. CDiffDoc::CDiffDoc()
  30. {
  31.     // TODO: add one-time construction code here
  32.  
  33. }
  34.  
  35. CDiffDoc::~CDiffDoc()
  36. {
  37. }
  38.  
  39. BOOL CDiffDoc::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. // CDiffDoc serialization
  52.  
  53. void CDiffDoc::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. // CDiffDoc diagnostics
  67.  
  68. #ifdef _DEBUG
  69. void CDiffDoc::AssertValid() const
  70. {
  71.     CDocument::AssertValid();
  72. }
  73.  
  74. void CDiffDoc::Dump(CDumpContext& dc) const
  75. {
  76.     CDocument::Dump(dc);
  77. }
  78. #endif //_DEBUG
  79.  
  80. /////////////////////////////////////////////////////////////////////////////
  81. // CDiffDoc commands
  82.