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

  1. // cubedoc.cpp : implementation of the CCubeDoc 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 "cube.h"
  15.  
  16. #include "cubedoc.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CCubeDoc
  25.  
  26. IMPLEMENT_DYNCREATE(CCubeDoc, CDocument)
  27.  
  28. BEGIN_MESSAGE_MAP(CCubeDoc, CDocument)
  29.     //{{AFX_MSG_MAP(CCubeDoc)
  30.         // NOTE - the ClassWizard will add and remove mapping macros here.
  31.         //    DO NOT EDIT what you see in these blocks of generated code!
  32.     //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CCubeDoc construction/destruction
  37.  
  38. CCubeDoc::CCubeDoc()
  39. {
  40.     // TODO: add one-time construction code here
  41.  
  42. }
  43.  
  44. CCubeDoc::~CCubeDoc()
  45. {
  46. }
  47.  
  48. BOOL CCubeDoc::OnNewDocument()
  49. {
  50.     if (!CDocument::OnNewDocument())
  51.         return FALSE;
  52.  
  53.     // TODO: add reinitialization code here
  54.     // (SDI documents will reuse this document)
  55.  
  56.     return TRUE;
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CCubeDoc serialization
  61.  
  62. void CCubeDoc::Serialize(CArchive& ar)
  63. {
  64.     if (ar.IsStoring())
  65.     {
  66.         // TODO: add storing code here
  67.     }
  68.     else
  69.     {
  70.         // TODO: add loading code here
  71.     }
  72. }
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CCubeDoc diagnostics
  76.  
  77. #ifdef _DEBUG
  78. void CCubeDoc::AssertValid() const
  79. {
  80.     CDocument::AssertValid();
  81. }
  82.  
  83. void CCubeDoc::Dump(CDumpContext& dc) const
  84. {
  85.     CDocument::Dump(dc);
  86. }
  87. #endif //_DEBUG
  88.  
  89. /////////////////////////////////////////////////////////////////////////////
  90. // CCubeDoc commands
  91.