home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c07 / lab02 / ex01 / diffdoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.8 KB  |  87 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, CRichEditDoc)
  18.  
  19. BEGIN_MESSAGE_MAP(CDiffDoc, CRichEditDoc)
  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. CRichEditCntrItem* CDiffDoc::CreateClientItem(REOBJECT* preo) const
  40. {
  41.         return new CRichEditCntrItem();
  42. }
  43.  
  44. BOOL CDiffDoc::OnNewDocument()
  45. {
  46.     if (!CRichEditDoc::OnNewDocument())
  47.         return FALSE;
  48.  
  49.     // TODO: add reinitialization code here
  50.     // (SDI documents will reuse this document)
  51.  
  52.     return TRUE;
  53. }
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CDiffDoc serialization
  57.  
  58. void CDiffDoc::Serialize(CArchive& ar)
  59. {
  60.     if (ar.IsStoring())
  61.     {
  62.         // TODO: add storing code here
  63.     }
  64.     else
  65.     {
  66.         // TODO: add loading code here
  67.     }
  68. }
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71. // CDiffDoc diagnostics
  72.  
  73. #ifdef _DEBUG
  74. void CDiffDoc::AssertValid() const
  75. {
  76.     CRichEditDoc::AssertValid();
  77. }
  78.  
  79. void CDiffDoc::Dump(CDumpContext& dc) const
  80. {
  81.     CRichEditDoc::Dump(dc);
  82. }
  83. #endif //_DEBUG
  84.  
  85. /////////////////////////////////////////////////////////////////////////////
  86. // CDiffDoc commands
  87.