Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.6 KiB

  1. // MFC_DEMODoc.cpp : implementation of the CMFC_DEMODoc class
  2. //
  3. #include "stdafx.h"
  4. #include "MFC_DEMO.h"
  5. #include "point.h"
  6. #include "DEMODoc.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CMFC_DEMODoc
  14. IMPLEMENT_DYNCREATE(CMFC_DEMODoc, CDocument)
  15. BEGIN_MESSAGE_MAP(CMFC_DEMODoc, CDocument)
  16. //{{AFX_MSG_MAP(CMFC_DEMODoc)
  17. //}}AFX_MSG_MAP
  18. END_MESSAGE_MAP()
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CMFC_DEMODoc construction/destruction
  21. CMFC_DEMODoc::CMFC_DEMODoc()
  22. {
  23. pt_lst = new list<point>;
  24. }
  25. CMFC_DEMODoc::~CMFC_DEMODoc()
  26. {
  27. delete pt_lst;
  28. }
  29. BOOL CMFC_DEMODoc::OnNewDocument()
  30. {
  31. if (!CDocument::OnNewDocument())
  32. return FALSE;
  33. // Clear the point list
  34. delete pt_lst;
  35. pt_lst = new list<point>;
  36. return TRUE;
  37. }
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CMFC_DEMODoc serialization
  40. void CMFC_DEMODoc::Serialize(CArchive& ar)
  41. {
  42. if (ar.IsStoring())
  43. {
  44. // TODO: add storing code here
  45. }
  46. else
  47. {
  48. // TODO: add loading code here
  49. }
  50. }
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CMFC_DEMODoc diagnostics
  53. #ifdef _DEBUG
  54. void CMFC_DEMODoc::AssertValid() const
  55. {
  56. CDocument::AssertValid();
  57. }
  58. void CMFC_DEMODoc::Dump(CDumpContext& dc) const
  59. {
  60. CDocument::Dump(dc);
  61. }
  62. #endif //_DEBUG
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CMFC_DEMODoc commands