#if !defined(AFX_ShowPic22_H__636EAAC4_D01D_4170_93F6_9E363BB72892__INCLUDED_) #define AFX_ShowPic22_H__636EAAC4_D01D_4170_93F6_9E363BB72892__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif #include "JPEG.h" #include "MyAnimateWindow.h" #include "PicBar.h" #include "PreviewDlg.h" class ChoosePhotoBase; // 浏览大图; class ShowPic22 : public CDialog { // Construction public: ShowPic22(CWnd* pParent = NULL); // standard constructor enum { IDD = IDD_DLGShowPic2 }; virtual BOOL PreTranslateMessage(MSG* pMsg); public: void CutPhoto3(); void CutPhoto2(); void ShowInfo(); void OnMouseWheel2(BOOL bZoomOut); void RunPicThread(); void InitRc(Image *img, CRect &rc); void TerminateThread(); void SetEffect(int effect); void Next(); void Pre(); void Rotate2(); void Rotate1(); void InitRc(); void AutoPic(); void LoadImage(); public: ChoosePhotoBase* m_pParent; CStatic m_sta1; // 当前显示的相片路径索引; int m_nCurImgPos; // 原图片路径数组!变量命名不规则,词不达意更甚。 CStringArray* m_pPathArrayBigsize; // 原图路径或m图路径(快速选片时); CStringArray* m_AryOfImgPath; // 原图Image指针或使用快速选片时m图Image指针(m_AryOfImgPath数组中的相片); CArray m_AryOfImgPtr; // 缩略图Image指针,此缩略图与显示器等比例全完整显示,与m_AryOfImgPtr对应; CArray m_AryOfSmallImgPtr; // m_AryOfImgPtr元素在m_AryOfImgPath的索引位置; CArray m_nPosArray; bool m_bRunning; // Flag to whether thread is on running or not bool m_bTerminate; // Flag to Thread to be terminated unsigned int m_dwThreadID; // Thread ID HANDLE m_hThread; // Thread and Event handle BOOL m_bauto; // 是否显示相片名称等信息; BOOL m_bShowImgInfo; BOOL m_bInit; BOOL m_bChooseBig; // 当前显示的图片; Image* m_pCurShowImg; private: // 当前显示的缩略图,与m_pCurShowImg对应; Image* m_pCurShowSmallImg; Image* m_pImagetemp; BOOL m_bcompared; CPoint m_startpt; CPoint m_startpt2; CPoint m_startpt3; // 原图或缩略图将要显示的区域; CRect m_rcImgShow; // 原图或缩略图放大或缩小前的显示区域(在放大或缩小前的备份); CRect m_rcImgShowBack; // 屏幕区域大小; CRect m_rcScreen; // Picbar控件所在区域; CRect m_picbarrc; Bitmap* m_pbmp; CBitmap m_bmp; CDC m_memdc; CPicture m_pic; BOOL m_bScroll; float m_fscale; MyAnimateWindow m_dlg; // 幻灯播放时的出现效果; PicBar m_PicBar; // 底部工具条; PreviewDlg m_PreviewDlg; // 右边显示缩略图; BOOL m_bProcessing; BOOL m_bShowEffect; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual BOOL OnInitDialog(); afx_msg void OnPaint(); afx_msg void OnDestroy(); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); afx_msg BOOL OnEraseBkgnd(CDC* pDC); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnClose(); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg long ShowInfo2(WPARAM inWParam, LPARAM inLParam); DECLARE_MESSAGE_MAP() }; #endif