MyImageWorkView.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // MyImageWorkView.h : interface of the CMyImageWorkView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MYIMAGEWORKVIEW_H__69990981_733B_4E21_B6CA_5198A5F8EF9F__INCLUDED_)
  5. #define AFX_MYIMAGEWORKVIEW_H__69990981_733B_4E21_B6CA_5198A5F8EF9F__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "DIB.h"
  10. class CMyImageWorkView : public CView
  11. {
  12. protected: // create from serialization only
  13. CMyImageWorkView();
  14. DECLARE_DYNCREATE(CMyImageWorkView)
  15. // Attributes
  16. public:
  17. CMyImageWorkDoc* GetDocument();
  18. int ImageStyle;//显示的模式:0--原大小,非0--全屏
  19. CDib m_Dib;
  20. bool have_open_a_file;
  21. bool embed, pick;
  22. bool show_contrast;
  23. // Operations
  24. public:
  25. // Overrides
  26. // ClassWizard generated virtual function overrides
  27. //{{AFX_VIRTUAL(CMyImageWorkView)
  28. public:
  29. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  30. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  31. protected:
  32. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  33. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  34. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. public:
  38. virtual ~CMyImageWorkView();
  39. #ifdef _DEBUG
  40. virtual void AssertValid() const;
  41. virtual void Dump(CDumpContext& dc) const;
  42. #endif
  43. protected:
  44. // Generated message map functions
  45. protected:
  46. //{{AFX_MSG(CMyImageWorkView)
  47. afx_msg void OnNormal();
  48. afx_msg void OnStretch();
  49. afx_msg void OnFileOpen();
  50. afx_msg void OnEmbed();
  51. afx_msg void OnPick();
  52. afx_msg void OnUpdatePick(CCmdUI* pCmdUI);
  53. afx_msg void OnUpdateEmbed(CCmdUI* pCmdUI);
  54. //}}AFX_MSG
  55. DECLARE_MESSAGE_MAP()
  56. };
  57. #ifndef _DEBUG // debug version in MyImageWorkView.cpp
  58. inline CMyImageWorkDoc* CMyImageWorkView::GetDocument()
  59. { return (CMyImageWorkDoc*)m_pDocument; }
  60. #endif
  61. /////////////////////////////////////////////////////////////////////////////
  62. //{{AFX_INSERT_LOCATION}}
  63. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  64. #endif // !defined(AFX_MYIMAGEWORKVIEW_H__69990981_733B_4E21_B6CA_5198A5F8EF9F__INCLUDED_)