-
Notifications
You must be signed in to change notification settings - Fork 0
/
UiFileDialogWnd.h
48 lines (45 loc) · 1.19 KB
/
UiFileDialogWnd.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
#pragma once
// include the MZFC library header file
#include <mzfc_inc.h>
class UiFileDialogWnd : public CMzWndEx {
MZ_DECLARE_DYNAMIC(UiFileDialogWnd);
public:
UiFileDialogWnd(void){
_title = NULL;
_filename = NULL;
_filesuffix = NULL;
_folder = NULL;
}
~UiFileDialogWnd(void){
if(_title) delete [] _title;
if(_filename) delete [] _filename;
if(_filesuffix) delete [] _filesuffix;
if(_folder) delete [] _folder;
}
public:
UiHeadingBar m_DialogTitle;
UiSingleLineEdit m_FileName;
UiButtonEx m_FolderPath;
UiToolbar_Text m_Toolbar;
public:
void SetTitle(LPCTSTR text);
void SetInitFileName(LPCTSTR text);
void SetInitFileSuffix(LPCTSTR text);
void SetInitFolder(LPCTSTR text);
//获取包含后缀名,路径的文件路径
LPTSTR GetFullFileName();
private:
bool checkFileName(); //检查文件名合法性
bool checkFileExist(); //检查文件是否已经存在
void getfileInfo();
protected:
// Initialization of the window (dialog)
virtual BOOL OnInitDialog();
// override the MZFC command handler
virtual void OnMzCommand(WPARAM wParam, LPARAM lParam);
private:
LPTSTR _title;
LPTSTR _filename;
LPTSTR _filesuffix;
LPTSTR _folder;
};