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.

91 lines
1.7 KiB

  1. // PrintSDIDoc.cpp : implementation of the CPrintSDIDoc class
  2. //
  3. #include "stdafx.h"
  4. #include "PrintSDI.h"
  5. #include "PrintSDIDoc.h"
  6. #include "newdocdlg.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CPrintSDIDoc
  14. IMPLEMENT_DYNCREATE(CPrintSDIDoc, CDocument)
  15. BEGIN_MESSAGE_MAP(CPrintSDIDoc, CDocument)
  16. //{{AFX_MSG_MAP(CPrintSDIDoc)
  17. // NOTE - the ClassWizard will add and remove mapping macros here.
  18. // DO NOT EDIT what you see in these blocks of generated code!
  19. //}}AFX_MSG_MAP
  20. END_MESSAGE_MAP()
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CPrintSDIDoc construction/destruction
  23. CPrintSDIDoc::CPrintSDIDoc()
  24. {
  25. m_szText.Empty();
  26. m_polytype = 0;
  27. }
  28. CPrintSDIDoc::~CPrintSDIDoc()
  29. {
  30. }
  31. BOOL CPrintSDIDoc::OnNewDocument()
  32. {
  33. if (!CDocument::OnNewDocument())
  34. return FALSE;
  35. NewDocDlg newdlg;
  36. newdlg.DoModal();
  37. m_szText = newdlg.m_szText;
  38. m_polytype = newdlg.m_polytype;
  39. return TRUE;
  40. }
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CPrintSDIDoc serialization
  43. void CPrintSDIDoc::Serialize(CArchive& ar)
  44. {
  45. if (ar.IsStoring())
  46. {
  47. ar << m_szText;
  48. ar << m_polytype;
  49. }
  50. else
  51. {
  52. ar >> m_szText;
  53. ar >> m_polytype;
  54. }
  55. }
  56. /////////////////////////////////////////////////////////////////////////////
  57. // CPrintSDIDoc diagnostics
  58. #ifdef _DEBUG
  59. void CPrintSDIDoc::AssertValid() const
  60. {
  61. CDocument::AssertValid();
  62. }
  63. void CPrintSDIDoc::Dump(CDumpContext& dc) const
  64. {
  65. CDocument::Dump(dc);
  66. }
  67. #endif //_DEBUG
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CPrintSDIDoc commands