00001
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef _MGUI_FILEDLG_H
00032 #define _MGUI_FILEDLG_H
00033
00034 #include <sys/types.h>
00035 #include <dirent.h>
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00055 #define FILE_ERROR_OK 0
00056
00061 #define FILE_ERROR_PARAMERR -1
00062
00067 #define FILE_ERROR_PATHNOTEXIST -2
00068
00073 typedef struct _FILEDLGDATA
00074 {
00076 BOOL IsSave;
00078 char filefullname[NAME_MAX + PATH_MAX + 1];
00080 char filename[NAME_MAX + 1];
00082 char filepath[PATH_MAX + 1];
00083 } FILEDLGDATA;
00084
00086 typedef FILEDLGDATA* PFILEDLGDATA;
00087
00113 MGEXT_EXPORT int OpenFileDialogEx (HWND hWnd, int lx, int ty,
00114 int w, int h, PFILEDLGDATA pmwfi);
00115
00138 static inline int OpenFileDialog (HWND hWnd, BOOL isSave, PFILEDLGDATA pmwfi)
00139 {
00140 pmwfi->IsSave = isSave;
00141 return OpenFileDialogEx (hWnd, 50, 50, 330, 280, pmwfi);
00142 }
00143
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151
00152 #endif
00153
00154