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

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