ShowPic22.h 2.6 KB

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