CImgPlayerDlg.h 1.3 KB

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