123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- #if !defined(AFX_ChoosePhotoSkin2_H__10660444_160F_41F4_9A1D_50A4F7C66150__INCLUDED_)
- #define AFX_ChoosePhotoSkin2_H__10660444_160F_41F4_9A1D_50A4F7C66150__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif
- #include "ChoosePhotoBase.h"
- typedef struct _SFolderInfo
- {
- CString strName;
- CStringArray AllPhotoPath;
- CStringArray SelPhotoPath;
- CStringArray NoSelPhotoPath;
- CStringArray DelPhotoPath;
- CStringArray IntoAlbumPath;
- CStringArray EntryPhasepath;
- }SFolderInfo;
- class ChoosePhotoSkin2 : public ChoosePhotoBase
- {
- public:
- enum { IDD = IDD_DLGChoosePhotoSkin2 };
- ChoosePhotoSkin2(DWORD id, CWnd *pParent);
- ChoosePhotoSkin2(CWnd* pParent = NULL);
-
- protected:
- virtual BOOL OnInitDialog();
- virtual void DoDataExchange(CDataExchange* pDX);
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- afx_msg void OnPaint();
- afx_msg void OnDestroy();
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnFSCommandShockwaveflash1(LPCTSTR command, LPCTSTR args);
- afx_msg void OnDblclkList1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnClose();
- afx_msg void OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnButton4();
- afx_msg void OnClickList1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnTimer(UINT nIDEvent);
- DECLARE_EVENTSINK_MAP()
-
- void OnCommandMenu(UINT nID);
- afx_msg VOID OnNewFolder();
- afx_msg VOID OnDelFolder();
- afx_msg VOID OnOpenFolder();
- afx_msg VOID OnReturnMainDir();
- #ifdef VC60
- afx_msg void OnBtnClick(WPARAM wParam, LPARAM lParam);
- #else
- afx_msg LRESULT OnBtnClick(WPARAM wParam, LPARAM lParam);
- #endif
- afx_msg void OnComMsg(WPARAM wParam, LPARAM lParam);
-
- afx_msg long UpdateTakeZS(WPARAM inWParam, LPARAM inLParam);
- DECLARE_MESSAGE_MAP()
- public:
- virtual void LoadPhotos();
- virtual BOOL ReLoad();
- virtual BOOL OnDel();
- virtual BOOL GetData();
-
- virtual void OnRclickList1();
- virtual void UpdateChooseZS();
- virtual CStringArray* GetCurArray(const int nIndx, SFolderInfo* m_pForder = NULL);
- virtual CString GetZSInfo(int iItem);
- virtual void GetNoSelPhoto();
-
- virtual void GetAllFolderNames(CString& strNames);
-
- virtual void DrawInterface();
-
- virtual void DrawImageWork();
-
- virtual int GetPathAddToSel(CStringArray* pSelArr, const CString& strName, CStringArray* pAllArr);
-
- virtual void GetAllFileFromFolder(const int nType, CString& strFileNames);
- public:
-
- void LoadFolder();
-
- void OnSelPhoto();
-
- void GetDiskPhoto();
-
- void GetAlbumPhoto();
-
- void DrawImage(CListCtrl* pListCtrl, CImageList* pImgList);
-
- int GetFolderData(CArray<CStringArray, CStringArray>& folderarr);
-
- SFolderInfo* AddFolder(const CString& strName);
-
- int DelFolderFromName(const CString& stName);
-
- int MoveFileSubToMain(SFolderInfo* pCurrForder, const int nCurrSelIndx = 0);
-
- int MoveFileMainToSub(vector<CString>& vMoveFile, SFolderInfo* pCurrSelForder, const int nCurrSelIndx = 0);
-
- SFolderInfo* FindForderFromIndx(const int nIdx);
-
- int ShowFolderMenu(const int nType, const LPCTSTR pName);
-
- int ShowFolderMenu(vector<SMenuBtnData>& vdata);
-
- void ClearFolder();
- #if USE_SHARE_FLORD
- void LoadSelectPhotos();
- void LoadDesignPhotos();
- void LoadNecessaryImage(IN CStringArray &strAryOfEarlyImage, IN CStringArray &strAryOfOriginalImage, IN const int &nSelectType);
- void LoadSpecifiedDirectoryPhotos(IN LPCTSTR lpSpecifiedDirectory, OUT CStringArray &strArray, IN BOOL bEffect, IN CStringArray *pEarlyDirectory , IN CStringArray *pEarlyImages = NULL );
- #endif
- private:
- void SortArray();
- void CheckForAlbum();
- int GetPathAddToSel(const CString& strName);
- BOOL IsSelAlbumPhoto(CString path);
- void CheckForDisk();
-
-
- void GetNamesFromFoler(const CString& strFolder, const CString& strPhotos, CStringArray& arr);
-
- void GetFolderFromFolders(const CString& strFolders);
-
- void GetFolderDelPhotos(CString& strDel);
-
- void GetDelPhotos(CStringArray* pDelPhotoArr, CString& strDelPhotos);
- void GetDelPhotos(const CString& strFolderName, CStringArray* pDelPhotoArr, const BOOL bAddEnd, CString& strDelPhotos);
- BOOL IsSelDiskPhoto(CString path);
-
- void OnDblclkList1();
-
- int AddListItemName(CListCtrl* pListCtrl);
-
- public:
- CString m_strStatusOfChoosePhoto;
- Image* m_pFolderImg;
- SFolderInfo* m_OpenFolder;
- SFolderInfo* m_pCurrSelFolder;
- vector<SFolderInfo*> m_vFolder;
- };
- #endif
|