Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.3 KiB

  1. // ImageView.h : interface of the CImageView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_IMAGEVIEW_H__D6029136_FBEC_4C9D_A161_35D6A1DF87C1__INCLUDED_)
  5. #define AFX_IMAGEVIEW_H__D6029136_FBEC_4C9D_A161_35D6A1DF87C1__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CImageView : public CView
  10. {
  11. protected: // create from serialization only
  12. CImageView();
  13. DECLARE_DYNCREATE(CImageView)
  14. // Attributes
  15. public:
  16. CImageDoc* GetDocument();
  17. // Operations
  18. public:
  19. // Overrides
  20. // ClassWizard generated virtual function overrides
  21. //{{AFX_VIRTUAL(CImageView)
  22. public:
  23. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  24. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  25. virtual void OnInitialUpdate();
  26. protected:
  27. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  28. //}}AFX_VIRTUAL
  29. // Implementation
  30. public:
  31. virtual ~CImageView();
  32. HRESULT SaveImageAs (LPCTSTR lpszPath);
  33. #ifdef _DEBUG
  34. virtual void AssertValid() const;
  35. virtual void Dump(CDumpContext& dc) const;
  36. #endif
  37. protected:
  38. // Generated message map functions
  39. protected:
  40. //{{AFX_MSG(CImageView)
  41. afx_msg void OnBestFitPress();
  42. afx_msg void OnActualSizePress();
  43. afx_msg void OnErrorPrevctrl();
  44. afx_msg void OnPreviewReady();
  45. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  46. afx_msg void OnSize(UINT nType, int cx, int cy);
  47. afx_msg void OnViewActualsize();
  48. afx_msg void OnUpdateViewMenu(CCmdUI* pCmdUI);
  49. afx_msg void OnViewBestfit();
  50. afx_msg void OnViewSlideshow();
  51. afx_msg void OnViewZoomIn();
  52. afx_msg void OnViewZoomOut();
  53. afx_msg void OnEditRotateCounter();
  54. afx_msg void OnEditRotateClockwise();
  55. DECLARE_EVENTSINK_MAP()
  56. //}}AFX_MSG
  57. DECLARE_MESSAGE_MAP()
  58. private:
  59. CPreview3 m_PrevCtrl;
  60. bool m_bBestFit;
  61. };
  62. #ifndef _DEBUG // debug version in ImageView.cpp
  63. inline CImageDoc* CImageView::GetDocument()
  64. { return (CImageDoc*)m_pDocument; }
  65. #endif
  66. /////////////////////////////////////////////////////////////////////////////
  67. //{{AFX_INSERT_LOCATION}}
  68. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  69. #endif // !defined(AFX_IMAGEVIEW_H__D6029136_FBEC_4C9D_A161_35D6A1DF87C1__INCLUDED_)