Source code of Windows XP (NT5)
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.

88 lines
2.1 KiB

  1. // testDoc.cpp : implementation of the CTestDoc class
  2. //
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1997-1999 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. #include "stdafx.h"
  12. #include "MQApitst.h"
  13. #include "testDoc.h"
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CTestDoc
  21. IMPLEMENT_DYNCREATE(CTestDoc, CDocument)
  22. BEGIN_MESSAGE_MAP(CTestDoc, CDocument)
  23. //{{AFX_MSG_MAP(CTestDoc)
  24. // NOTE - the ClassWizard will add and remove mapping macros here.
  25. // DO NOT EDIT what you see in these blocks of generated code!
  26. //}}AFX_MSG_MAP
  27. END_MESSAGE_MAP()
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CTestDoc construction/destruction
  30. CTestDoc::CTestDoc()
  31. {
  32. // TODO: add one-time construction code here
  33. }
  34. CTestDoc::~CTestDoc()
  35. {
  36. }
  37. BOOL CTestDoc::OnNewDocument()
  38. {
  39. if (!CDocument::OnNewDocument())
  40. return FALSE;
  41. ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
  42. // TODO: add reinitialization code here
  43. // (SDI documents will reuse this document)
  44. return TRUE;
  45. }
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CTestDoc serialization
  48. void CTestDoc::Serialize(CArchive& ar)
  49. {
  50. // CEditView contains an edit control which handles all serialization
  51. ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
  52. }
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CTestDoc diagnostics
  55. #ifdef _DEBUG
  56. void CTestDoc::AssertValid() const
  57. {
  58. CDocument::AssertValid();
  59. }
  60. void CTestDoc::Dump(CDumpContext& dc) const
  61. {
  62. CDocument::Dump(dc);
  63. }
  64. #endif //_DEBUG
  65. /////////////////////////////////////////////////////////////////////////////
  66. // CTestDoc commands