QRCodeViewer.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #include "GdipButton.h"
  3. #include "DittoWindow.h"
  4. #include "SnapWindow.h"
  5. // QRCodeViewer
  6. class QRCodeViewer : public CWnd
  7. {
  8. DECLARE_DYNAMIC(QRCodeViewer)
  9. public:
  10. QRCodeViewer();
  11. virtual void PostNcDestroy();
  12. virtual BOOL PreTranslateMessage(MSG* pMsg);
  13. virtual ~QRCodeViewer();
  14. CDittoWindow m_DittoWindow;
  15. BOOL CreateEx(CWnd *pParentWnd, unsigned char* bitmapData, int imageSize, CString desc, int rowHeight, LOGFONT font);
  16. CStatic m_desc;
  17. protected:
  18. afx_msg HITTEST_RET OnNcHitTest(CPoint point);
  19. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  20. afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
  21. afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
  22. afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
  23. afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
  24. afx_msg void OnNcPaint();
  25. DECLARE_MESSAGE_MAP()
  26. afx_msg void OnPaint();
  27. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  28. afx_msg void OnSize(UINT nType, int cx, int cy);
  29. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  30. afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
  31. afx_msg void OnTimer(UINT_PTR nIDEvent);
  32. afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam);
  33. afx_msg void OnMoving(UINT fwSide, LPRECT pRect);
  34. afx_msg void OnEnterSizeMove();
  35. unsigned char* m_bitmapData;
  36. int m_imageSize;
  37. CGdipButton m_ShowGroupsFolderBottom;
  38. CGdiImageDrawer m_qrCodeDrawer;
  39. int m_descRowHeight;
  40. CFont m_font;
  41. HBRUSH m_descBackground;
  42. LOGFONT m_logFont;
  43. int m_originalFontHeight;
  44. SnapWindow m_snap;
  45. void MoveControls();
  46. };