GuiVisioDemoView.cpp
上传用户:wlkj888
上传日期:2022-08-01
资源大小:806k
文件大小:3k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // GuiVisioDemoView.cpp : implementation of the CGuiVisioDemoView class
  2. //
  3. #include "stdafx.h"
  4. #include "GuiVisioDemo.h"
  5. #include "GuiVisioDemoDoc.h"
  6. #include "GuiVisioDemoView.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CGuiVisioDemoView
  14. IMPLEMENT_DYNCREATE(CGuiVisioDemoView, CView)
  15. BEGIN_MESSAGE_MAP(CGuiVisioDemoView, CView)
  16. //{{AFX_MSG_MAP(CGuiVisioDemoView)
  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. // Standard printing commands
  21. ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  22. ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
  23. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  24. END_MESSAGE_MAP()
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CGuiVisioDemoView construction/destruction
  27. CGuiVisioDemoView::CGuiVisioDemoView()
  28. {
  29. // TODO: add construction code here
  30. }
  31. CGuiVisioDemoView::~CGuiVisioDemoView()
  32. {
  33. }
  34. BOOL CGuiVisioDemoView::PreCreateWindow(CREATESTRUCT& cs)
  35. {
  36. // TODO: Modify the Window class or styles here by modifying
  37. //  the CREATESTRUCT cs
  38. return CView::PreCreateWindow(cs);
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CGuiVisioDemoView drawing
  42. void CGuiVisioDemoView::OnDraw(CDC* pDC)
  43. {
  44. CGuiVisioDemoDoc* pDoc = GetDocument();
  45. ASSERT_VALID(pDoc);
  46. // TODO: add draw code for native data here
  47. }
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CGuiVisioDemoView printing
  50. BOOL CGuiVisioDemoView::OnPreparePrinting(CPrintInfo* pInfo)
  51. {
  52. // default preparation
  53. return DoPreparePrinting(pInfo);
  54. }
  55. void CGuiVisioDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  56. {
  57. // TODO: add extra initialization before printing
  58. }
  59. void CGuiVisioDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  60. {
  61. // TODO: add cleanup after printing
  62. }
  63. /////////////////////////////////////////////////////////////////////////////
  64. // CGuiVisioDemoView diagnostics
  65. #ifdef _DEBUG
  66. void CGuiVisioDemoView::AssertValid() const
  67. {
  68. CView::AssertValid();
  69. }
  70. void CGuiVisioDemoView::Dump(CDumpContext& dc) const
  71. {
  72. CView::Dump(dc);
  73. }
  74. CGuiVisioDemoDoc* CGuiVisioDemoView::GetDocument() // non-debug version is inline
  75. {
  76. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGuiVisioDemoDoc)));
  77. return (CGuiVisioDemoDoc*)m_pDocument;
  78. }
  79. #endif //_DEBUG
  80. /////////////////////////////////////////////////////////////////////////////
  81. // CGuiVisioDemoView message handlers