home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / leadtools / ocx32.lt / Scrdoc.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-30  |  1.7 KB  |  86 lines

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