ShowPic22.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #if !defined(AFX_ShowPic22_H__636EAAC4_D01D_4170_93F6_9E363BB72892__INCLUDED_)
  2. #define AFX_ShowPic22_H__636EAAC4_D01D_4170_93F6_9E363BB72892__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif
  6. #include "ChoosePhotoSkin2.h"
  7. #include "JPEG.h"
  8. #include "MyAnimateWindow.h"
  9. #include "PicBar.h"
  10. #include "PreviewDlg.h"
  11. // 浏览大图;
  12. class ShowPic22 : public CDialog
  13. {
  14. BOOL m_bcompared;
  15. CPoint m_startpt;
  16. CPoint m_startpt2;
  17. CPoint m_startpt3;
  18. Image *m_pImagesmall;
  19. Image *m_pImagetemp;
  20. CRect m_rc;
  21. CRect m_rcbak;
  22. CRect m_rcscreen;
  23. CRect m_picbarrc;
  24. Bitmap *m_pbmp;
  25. CBitmap m_bmp;
  26. CDC m_memdc;
  27. CPicture m_pic;
  28. BOOL m_bScroll;
  29. float m_fscale;
  30. MyAnimateWindow m_dlg; // 幻灯播放时的出现效果;
  31. PicBar m_PicBar; // 底部工具条;
  32. PreviewDlg m_PreviewDlg; // 右边显示缩略图;
  33. BOOL m_bProcessing;
  34. BOOL m_bShowEffect;
  35. // Construction
  36. public:
  37. // Jeff 以下三变量为外部初始化;
  38. int m_pos; // 选片时选中的相片列编号,即要查看的相片;
  39. CStringArray *m_pPathArray; // 原图片对应的"m"图片路径;
  40. CStringArray *m_pPathArrayBigsize; // 原图片路径数组!变量命名不规则,词不达意更甚。
  41. BOOL m_bChooseBig;
  42. void CutPhoto3();
  43. void CutPhoto2();
  44. void ShowInfo();
  45. void OnMouseWheel2(BOOL bZoomOut);
  46. void RunPicThread();
  47. BOOL m_bShowName;
  48. BOOL m_bInit;
  49. Image *m_pImage;
  50. void InitRc(Image *img, CRect &rc);
  51. CArray<Image*, Image*>m_pImageArray;
  52. CArray<Image*, Image*>m_pImageSmallArray;
  53. CArray<int, int>m_nPosArray;
  54. void TerminateThread();
  55. bool m_bRunning; // Flag to whether thread is on running or not
  56. bool m_bTerminate; // Flag to Thread to be terminated
  57. unsigned int m_dwThreadID; // Thread ID
  58. HANDLE m_hThread; // Thread and Event handle
  59. BOOL m_bauto;
  60. void SetEffect(int effect);
  61. void Next();
  62. void Pre();
  63. void Rotate2();
  64. void Rotate1();
  65. void InitRc();
  66. void AutoPic();
  67. ChoosePhotoSkin2 *m_pParent;
  68. void LoadImage();
  69. ShowPic22(CWnd* pParent = NULL); // standard constructor
  70. enum { IDD = IDD_DLGShowPic2 };
  71. CStatic m_sta1;
  72. public:
  73. virtual BOOL PreTranslateMessage(MSG* pMsg);
  74. protected:
  75. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  76. virtual BOOL OnInitDialog();
  77. afx_msg void OnPaint();
  78. afx_msg void OnDestroy();
  79. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  80. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  81. afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  82. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  83. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  84. afx_msg void OnTimer(UINT nIDEvent);
  85. afx_msg void OnClose();
  86. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  87. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  88. afx_msg long ShowInfo2(WPARAM inWParam, LPARAM inLParam);
  89. DECLARE_MESSAGE_MAP()
  90. };
  91. #endif