-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathOFN.h
48 lines (34 loc) · 912 Bytes
/
OFN.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
/*****************************************************************************
OFN
---
Small mini class for easier OpenFileName-stuff
by yoda
WWW: y0da.cjb.net
E-mail: [email protected]
You are allowed to use this source code in your own projects if you mention
my name.
*****************************************************************************/
#ifndef __OFN_h__
#define __OFN_h__
#include <windows.h>
#include <commdlg.h>
//
// constants
//
#define DEFAULT_OFN_SAVE OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT
#define DEFAULT_OFN_OPEN OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY
//
// OFN
//
class OFN
{
public:
OPENFILENAME ofnOpen;
OPENFILENAME ofnSave;
char cPathOpen[MAX_PATH], cPathSave[MAX_PATH];
OFN();
~OFN();
BOOL GetOpenFilePath();
BOOL GetSaveFilePath();
};
#endif