-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileDialogEx.h
executable file
·50 lines (43 loc) · 1.48 KB
/
FileDialogEx.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
////////////////////////////////////////////////////////////////
// MSDN -- August 2000
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Compiles with Visual C++ 6.0, runs on Windows 98 and probably NT too.
//
#pragma once
// Windows 2000 version of OPENFILENAME.
// The new version has three extra members.
// This is copied from commdlg.h
//
struct OPENFILENAMEEX : public OPENFILENAME {
void * pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
};
/////////////////////////////////////////////////////////////////////////////
// CFileDialogEx: Encapsulate Windows-2000 style open dialog.
//
class CFileDialogEx : public CFileDialog {
DECLARE_DYNAMIC(CFileDialogEx)
public:
CFileDialogEx(BOOL bOpenFileDialog, // TRUE for open, FALSE for FileSaveAs
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
LPCTSTR lpszFilter = NULL,
CWnd* pParentWnd = NULL);
// override
virtual int DoModal();
protected:
OPENFILENAMEEX m_ofnEx; // new Windows 2000 version of OPENFILENAME
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
// virtual fns that handle various notifications
virtual BOOL OnFileNameOK();
virtual void OnInitDone();
virtual void OnFileNameChange();
virtual void OnFolderChange();
virtual void OnTypeChange();
DECLARE_MESSAGE_MAP()
//{{AFX_MSG(CFileDialogEx)
//}}AFX_MSG
};