| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#if !defined(AFX_FILEPAGEADDDLG_H__F3555122_C5AB_11D2_AB2B_006008BF0B09__INCLUDED_) |
| 20 |
#define AFX_FILEPAGEADDDLG_H__F3555122_C5AB_11D2_AB2B_006008BF0B09__INCLUDED_ |
| 21 |
|
| 22 |
#if _MSC_VER > 1000 |
| 23 |
#pragma once |
| 24 |
#endif |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#define DRIVES 0 |
| 32 |
#define DIRECTORIES 1 |
| 33 |
#define FILES 2 |
| 34 |
|
| 35 |
extern char *DirectoryNames[]; |
| 36 |
extern int NumDirectoryNames; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
class CFileList : public CListBox { |
| 41 |
|
| 42 |
public: |
| 43 |
BOOL RefreshMask(CString mask); |
| 44 |
BOOL RefreshBox(CString path); |
| 45 |
|
| 46 |
BOOL RefreshBox(CString path, CString mask); |
| 47 |
void setFileMask(CString mask); |
| 48 |
CString getFileMask(); |
| 49 |
void setPath(CString path); |
| 50 |
CString getPath(); |
| 51 |
BOOL InitBox(UINT res, CWnd *parent, LPSTR lpszPath, LPSTR lpszFileMask, UINT flags, UINT msg, |
| 52 |
void (*cb)(char *path) = NULL); |
| 53 |
CFileList(); |
| 54 |
|
| 55 |
|
| 56 |
public: |
| 57 |
|
| 58 |
protected: |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
public: |
| 66 |
virtual ~CFileList(); |
| 67 |
|
| 68 |
|
| 69 |
protected: |
| 70 |
|
| 71 |
afx_msg void OnDblclk(); |
| 72 |
|
| 73 |
|
| 74 |
DECLARE_MESSAGE_MAP() |
| 75 |
private: |
| 76 |
CWnd *m_cwndParent; |
| 77 |
UINT m_nMsg; |
| 78 |
UINT m_nFlag; |
| 79 |
CString m_csPath; |
| 80 |
CString m_csFileMask; |
| 81 |
void CheckEntry(LPSTR name, DWORD flag, BOOL dir); |
| 82 |
BOOL FillBox(); |
| 83 |
void (*callback)(char *path); |
| 84 |
}; |
| 85 |
|
| 86 |
class CFilePageAddDlg : public CDialog { |
| 87 |
|
| 88 |
public: |
| 89 |
CFilePageAddDlg(CWnd *pParent = NULL); |
| 90 |
~CFilePageAddDlg(void); |
| 91 |
|
| 92 |
void SetInitialPath(char *path); |
| 93 |
|
| 94 |
int m_NumberOfSelectedFiles; |
| 95 |
char **m_SelectedFiles; |
| 96 |
char *m_SelectedDestDir; |
| 97 |
|
| 98 |
private: |
| 99 |
bool Quit(void); |
| 100 |
CString initial_path; |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
enum { IDD = IDD_FILEPAGEADD }; |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
protected: |
| 112 |
virtual void DoDataExchange(CDataExchange *pDX); |
| 113 |
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
protected: |
| 118 |
|
| 119 |
|
| 120 |
virtual BOOL OnInitDialog(); |
| 121 |
afx_msg void OnSelchangeListDrives(); |
| 122 |
afx_msg void OnSelchangeListFolders(); |
| 123 |
virtual void OnOK(); |
| 124 |
|
| 125 |
DECLARE_MESSAGE_MAP() |
| 126 |
|
| 127 |
private: |
| 128 |
|
| 129 |
CFileList m_cflDrive; |
| 130 |
CFileList m_cflDir; |
| 131 |
CFileList m_cflFile; |
| 132 |
|
| 133 |
|
| 134 |
UINT m_nBoxMsg; |
| 135 |
}; |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
#endif |