CImgPlayerDlg.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. 
  2. // CImgPlayerDlg.h : 头文件
  3. //
  4. #pragma once
  5. #include "libimgplayer.h"
  6. #include "resource.h"
  7. // CImgPlayerDlg 对话框
  8. class CImgPlayerDlg : public CDialogEx
  9. {
  10. // 构造
  11. public:
  12. CImgPlayerDlg(CWnd* pParent = NULL); // 标准构造函数
  13. CImgPlayerDlg(CImgPlayConfig *pConfig, CWnd* pParent = NULL);
  14. ~CImgPlayerDlg();
  15. private:
  16. BOOL EndPlay();
  17. // 对话框数据
  18. enum { IDD = IDD_IMGPLAYER_DIALOG };
  19. protected:
  20. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  21. void ShowImage(CImage& img, UINT ID);
  22. // 实现
  23. protected:
  24. HICON m_hIcon;
  25. bool m_bInit;//OnInitDialog是否执行结束
  26. bool m_bTimer;//计时器是否在执行
  27. CImage m_Image;//图像工具
  28. HMONITOR m_hMonitor;//图片显示所在的屏幕句柄
  29. CRect m_monitorRect;//图片显示所在的屏幕位置和大小
  30. CImgPlayConfig *m_pConfig;
  31. int m_nPlayCnt; // 已重复播放次数(多张图片顺序播完一次算重复播一次)
  32. int m_nPicInx; // 当前图片序号
  33. // 双缓冲机制
  34. CBitmap* m_pOldBitmap;
  35. CBitmap* m_pMemBitmap; //声明内存中承载临时图象的位图
  36. CDC* m_pMemDC; //声明用于缓冲作图的内存DC
  37. // 生成的消息映射函数
  38. virtual BOOL OnInitDialog();
  39. afx_msg void OnPaint();
  40. afx_msg HCURSOR OnQueryDragIcon();
  41. DECLARE_MESSAGE_MAP()
  42. public:
  43. afx_msg void OnSize(UINT nType, int cx, int cy);
  44. afx_msg void OnClose();
  45. afx_msg void OnTimer(UINT_PTR nIDEvent);
  46. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  47. };