home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / snapvw / snapdoc.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  81 lines

  1. // SnapDoc.cpp : implementation of the CSnapDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "SnapVw.h"
  15.  
  16. #include "SnapDoc.h"
  17.  
  18. #ifdef _DEBUG
  19. #define new DEBUG_NEW
  20. #undef THIS_FILE
  21. static char THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CSnapDoc
  26.  
  27. IMPLEMENT_DYNCREATE(CSnapDoc, CDocument)
  28.  
  29. BEGIN_MESSAGE_MAP(CSnapDoc, CDocument)
  30.     //{{AFX_MSG_MAP(CSnapDoc)
  31.         // NOTE - the ClassWizard will add and remove mapping macros here.
  32.         //    DO NOT EDIT what you see in these blocks of generated code!
  33.     //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CSnapDoc construction/destruction
  38.  
  39. CSnapDoc::CSnapDoc()
  40. {
  41.     // TODO: add one-time construction code here
  42.  
  43. }
  44.  
  45. CSnapDoc::~CSnapDoc()
  46. {
  47. }
  48.  
  49. BOOL CSnapDoc::OnNewDocument()
  50. {
  51.     if (!CDocument::OnNewDocument())
  52.         return FALSE;
  53.  
  54.     // TODO: add reinitialization code here
  55.     // (SDI documents will reuse this document)
  56.  
  57.     return TRUE;
  58. }
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CSnapDoc serialization
  62.  
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CSnapDoc diagnostics
  66.  
  67. #ifdef _DEBUG
  68. void CSnapDoc::AssertValid() const
  69. {
  70.     CDocument::AssertValid();
  71. }
  72.  
  73. void CSnapDoc::Dump(CDumpContext& dc) const
  74. {
  75.     CDocument::Dump(dc);
  76. }
  77. #endif //_DEBUG
  78.  
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CSnapDoc commands
  81.