aboutsummaryrefslogtreecommitdiff
path: root/CPP/Windows/CommonDialog.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/Windows/CommonDialog.h44
1 files changed, 32 insertions, 12 deletions
diff --git a/CPP/Windows/CommonDialog.h b/CPP/Windows/CommonDialog.h
index aaf17ac..85b071f 100644
--- a/CPP/Windows/CommonDialog.h
+++ b/CPP/Windows/CommonDialog.h
@@ -1,22 +1,42 @@
1// Windows/CommonDialog.h 1// Windows/CommonDialog.h
2 2
3#ifndef __WINDOWS_COMMON_DIALOG_H 3#ifndef ZIP7_INC_WINDOWS_COMMON_DIALOG_H
4#define __WINDOWS_COMMON_DIALOG_H 4#define ZIP7_INC_WINDOWS_COMMON_DIALOG_H
5 5
6#include "../Common/MyString.h" 6#include "../Common/MyString.h"
7 7
8namespace NWindows { 8namespace NWindows {
9 9
10bool MyGetOpenFileName(HWND hwnd, LPCWSTR title, 10struct CCommonDialogInfo
11 LPCWSTR initialDir, // can be NULL, so dir prefix in filePath will be used 11{
12 LPCWSTR filePath, // full path 12 /* (FilterIndex == -1) means no selected filter.
13 LPCWSTR filterDescription, // like "All files (*.*)" 13 and (-1) also is reserved for unsupported custom filter.
14 LPCWSTR filter, // like "*.exe" 14 if (FilterIndex >= 0), then FilterIndex is index of filter */
15 UString &resPath 15 int FilterIndex; // [in / out]
16 #ifdef UNDER_CE 16 bool SaveMode;
17 , bool openFolder = false 17 #ifdef UNDER_CE
18 #endif 18 bool OpenFolderMode;
19); 19 #endif
20 HWND hwndOwner;
21 // LPCWSTR lpstrInitialDir;
22 LPCWSTR lpstrTitle;
23 UString FilePath; // [in / out]
24
25 CCommonDialogInfo()
26 {
27 FilterIndex = -1;
28 SaveMode = false;
29 #ifdef UNDER_CE
30 OpenFolderMode = false;
31 #endif
32 hwndOwner = NULL;
33 // lpstrInitialDir = NULL;
34 lpstrTitle = NULL;
35 }
36
37 /* (filters) : 2 sequential vector strings (Description, Masks) represent each filter */
38 bool CommonDlg_BrowseForFile(LPCWSTR lpstrInitialDir, const UStringVector &filters);
39};
20 40
21} 41}
22 42