DrawSysView.h
上传用户:mosfetic
上传日期:2022-06-16
资源大小:4612k
文件大小:3k
源码类别:

GDI/图象编程

开发平台:

Visual C++

  1. // DrawSysView.h : interface of the CDrawSysView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_DRAWSYSVIEW_H__8D005AAE_21FD_471F_BB0B_DE7FE30A18F9__INCLUDED_)
  5. #define AFX_DRAWSYSVIEW_H__8D005AAE_21FD_471F_BB0B_DE7FE30A18F9__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CDrawShape;
  10. #define WM_CHOOSE (WM_USER+1)
  11. class CDrawSysView : public CScrollView
  12. {
  13. protected: // create from serialization only
  14. CDrawSysView();
  15. DECLARE_DYNCREATE(CDrawSysView)
  16. // Attributes
  17. public:
  18. CDrawSysDoc* GetDocument();
  19. CDrawShape* m_pDrawing;
  20. int m_iMode; // <0表示选择
  21. UINT m_nTimer;
  22. DWORD m_dwNewSel;
  23. DWORD m_dwOldSel;
  24. BOOL m_bNeed; //记录闪烁信息,是否需要恢复
  25. // Operations
  26. public:
  27. void MyKillTimer();
  28. void FlashShape();
  29. // Overrides
  30. // ClassWizard generated virtual function overrides
  31. //{{AFX_VIRTUAL(CDrawSysView)
  32. public:
  33. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  34. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  35. virtual void OnInitialUpdate();
  36. virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
  37. protected:
  38. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  39. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  40. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  41. virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll = TRUE);
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. public:
  45. virtual ~CDrawSysView();
  46. #ifdef _DEBUG
  47. virtual void AssertValid() const;
  48. virtual void Dump(CDumpContext& dc) const;
  49. #endif
  50. protected:
  51. // Generated message map functions
  52. protected:
  53. //{{AFX_MSG(CDrawSysView)
  54. afx_msg void OnButtonRect();
  55. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  56. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  57. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  58. afx_msg void OnButtonEllipse();
  59. afx_msg void OnButtonFillellipse();
  60. afx_msg void OnButtonCircle();
  61. afx_msg void OnButtonFillrect();
  62. afx_msg void OnButtonLine();
  63. afx_msg LRESULT OnChoose(WPARAM wParam, LPARAM lParam);
  64. afx_msg void OnTimer(UINT nIDEvent);
  65. afx_msg void OnDestroy();
  66. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. #ifndef _DEBUG  // debug version in DrawSysView.cpp
  71. inline CDrawSysDoc* CDrawSysView::GetDocument()
  72.    { return (CDrawSysDoc*)m_pDocument; }
  73. #endif
  74. /////////////////////////////////////////////////////////////////////////////
  75. //{{AFX_INSERT_LOCATION}}
  76. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  77. #endif // !defined(AFX_DRAWSYSVIEW_H__8D005AAE_21FD_471F_BB0B_DE7FE30A18F9__INCLUDED_)