HDrawView.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // HDrawView.h : interface of the CHDrawView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_HDRAWVIEW_H__E49A37E8_F413_47C5_A736_5AB3441146E2__INCLUDED_)
  5. #define AFX_HDRAWVIEW_H__E49A37E8_F413_47C5_A736_5AB3441146E2__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "MainFrm.h"
  10. #include "HDrawDoc.h"
  11. #include "HDrawView.h"
  12. class CHDrawView : public CView
  13. {
  14. public: //change to public, because it is used by others
  15. CHDrawView();
  16. // Attributes
  17. public:
  18. // Operations
  19. public:
  20. CHDrawDoc* GetDocument();
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CHDrawView)
  24. public:
  25. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  26. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  27. virtual BOOL PreTranslateMessage(MSG* pMsg);
  28. //}}AFX_VIRTUAL
  29. // Implementation
  30. public:
  31. void SetDocument(CHDrawDoc *pDoc);
  32. CPen m_pen;
  33. HStroke * m_stroke;
  34. //CTypedPtrArray<CObArray, HStroke *> m_strokeSelected;
  35. virtual ~CHDrawView();
  36. #ifdef _DEBUG
  37. virtual void AssertValid() const;
  38. virtual void Dump(CDumpContext& dc) const;
  39. #endif
  40. protected:
  41. // Generated message map functions
  42. protected:
  43. CDocument * pOldDoc;
  44. //{{AFX_MSG(CHDrawView)
  45. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  46. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  47. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  48. afx_msg void OnBmpSave();
  49. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  50. afx_msg void OnPicColorBlue();
  51. afx_msg void OnPicColorGreen();
  52. afx_msg void OnPicColorOther();
  53. afx_msg void OnPicColorRed();
  54. afx_msg void OnPicDash();
  55. afx_msg void OnPicSolid();
  56. afx_msg void OnPicW1();
  57. afx_msg void OnPicW2();
  58. afx_msg void OnPicW3();
  59. afx_msg void OnPicDelete();
  60. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. };
  64. #ifndef _DEBUG // debug version in HDrawView.cpp
  65. inline CHDrawDoc* CHDrawView::GetDocument()
  66. { return (CHDrawDoc*)m_pDocument; }
  67. #endif
  68. /////////////////////////////////////////////////////////////////////////////
  69. //{{AFX_INSERT_LOCATION}}
  70. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  71. #endif // !defined(AFX_HDRAWVIEW_H__E49A37E8_F413_47C5_A736_5AB3441146E2__INCLUDED_)