DIBView.h
上传用户:gzboli
上传日期:2013-04-10
资源大小:471k
文件大小:3k
源码类别:

图片显示

开发平台:

Visual C++

  1. // DIBView.h : interface of the CDIBView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_DIBVIEW_H__4143BF9B_D2B1_483E_A464_72D7957C0D0B__INCLUDED_)
  5. #define AFX_DIBVIEW_H__4143BF9B_D2B1_483E_A464_72D7957C0D0B__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CDIBDoc;
  10. //#include "Pipe.h"
  11. #include "Piccontrol.h"
  12. class CDIBView : public CView
  13. {
  14. //Attributes
  15. protected:
  16. POINT m_ptMouseDown;
  17. POINT m_ptTracing;
  18. POINT m_ptFirst;
  19. PICCONTROL m_Pipe[10];
  20. int m_iMaxBacks;
  21. double m_dMeasure;
  22. PICCONTROL Pop(void);
  23. void SetStatusText();
  24. public:
  25. CPoint m_ptDIBCenter;
  26. double m_dZoom;
  27. DWORD m_uIDMapButton;
  28. int m_iBacks;
  29. void Push();
  30. protected: // create from serialization only
  31. CDIBView();
  32. DECLARE_DYNCREATE(CDIBView)
  33. // Attributes
  34. public:
  35. CDIBDoc* GetDocument();
  36. // Operations
  37. public:
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CDIBView)
  41. public:
  42. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  43. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  44. virtual void OnInitialUpdate();
  45. protected:
  46. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  47. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  48. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. public:
  52. virtual ~CDIBView();
  53. #ifdef _DEBUG
  54. virtual void AssertValid() const;
  55. virtual void Dump(CDumpContext& dc) const;
  56. #endif
  57. protected:
  58. // Generated message map functions
  59. protected:
  60. afx_msg void OnContextMenu(CWnd*, CPoint point);
  61. //{{AFX_MSG(CDIBView)
  62. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  63. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  64. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  65. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  66. //}}AFX_MSG
  67. DECLARE_MESSAGE_MAP()
  68. afx_msg void OnMapButton(UINT uID);
  69. afx_msg void OnUpdateMapButtonState(CCmdUI* pCmdUI);
  70. afx_msg void OnDirButtons(UINT nID);
  71. afx_msg void OnUpdateDirButtons(CCmdUI *pCmdUI);
  72. };
  73. #ifndef _DEBUG  // debug version in DIBView.cpp
  74. inline CDIBDoc* CDIBView::GetDocument()
  75.    { return (CDIBDoc*)m_pDocument; }
  76. #endif
  77. /////////////////////////////////////////////////////////////////////////////
  78. //{{AFX_INSERT_LOCATION}}
  79. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  80. #endif // !defined(AFX_DIBVIEW_H__4143BF9B_D2B1_483E_A464_72D7957C0D0B__INCLUDED_)