ImageViewer.h 859 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "ScrollHelper.h"
  3. #include "Clip.h"
  4. class CImageViewer : public CWnd
  5. {
  6. DECLARE_DYNAMIC(CImageViewer)
  7. public:
  8. CImageViewer();
  9. virtual ~CImageViewer();
  10. Gdiplus::Bitmap *m_pGdiplusBitmap;
  11. CScrollHelper m_scrollHelper;
  12. void UpdateBitmapSize();
  13. BOOL Create(CWnd* pParent);
  14. bool m_hoveringOverImage;
  15. protected:
  16. DECLARE_MESSAGE_MAP()
  17. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  18. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  19. afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  20. afx_msg void OnSize(UINT nType, int cx, int cy);
  21. afx_msg void OnPaint();
  22. public:
  23. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  24. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  25. afx_msg void OnMouseHWheel(UINT nFlags, short zDelta, CPoint pt);
  26. };