-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSelectDialog.h
54 lines (45 loc) · 1.47 KB
/
SelectDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/********************************************************************
created: 2008/07/22
created: 22:7:2008 10:23
filename: SelectDialog.h
file base: SelectDialog
file ext: h
author: Hojjat Bohlooli - [email protected]
purpose: select multiple file and folders together in browse dialog
free for non commercial uses.
*********************************************************************/
#pragma once
#include <dlgs.h> // for (MULTI)FILEOPENORD
// CSelectDialog
class CSelectDialog : public CFileDialog
{
DECLARE_DYNAMIC(CSelectDialog)
public:
CSelectDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT |
OFN_EXPLORER & (~OFN_SHOWHELP),
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL);
virtual ~CSelectDialog();
protected:
virtual void OnInitDone();
virtual void OnFolderChange();
virtual BOOL OnFileNameOK();
static LRESULT CALLBACK WindowProcNew(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
static CString m_strCurrendDirectory;
static CStringArray m_SelectedItemList; /*this list includes files and folders
are selected by user. */
static WNDPROC m_wndProc;
};
#ifdef User
CSelectDialog sd(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST);
if (sd.DoModal() != IDOK)
{
return;
}
size_t nCount = sd.m_SelectedItemList.GetCount();
#endif // User