00001
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _MGUI_FILEDLG_H
00030 #define _MGUI_FILEDLG_H
00031
00032 #include <sys/types.h>
00033 #include <dirent.h>
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00053 #define FILE_ERROR_OK 0
00054
00059 #define FILE_ERROR_PARAMERR -1
00060
00065 #define FILE_ERROR_PATHNOTEXIST -2
00066
00071 typedef struct _FILEDLGDATA
00072 {
00074 BOOL IsSave;
00076 char filefullname[NAME_MAX + PATH_MAX + 1];
00078 char filename[NAME_MAX + 1];
00080 char filepath[PATH_MAX + 1];
00081 } FILEDLGDATA;
00082
00084 typedef FILEDLGDATA* PFILEDLGDATA;
00085
00111 MGEXT_EXPORT int OpenFileDialogEx (HWND hWnd, int lx, int ty,
00112 int w, int h, PFILEDLGDATA pmwfi);
00113
00136 static inline int OpenFileDialog (HWND hWnd, BOOL isSave, PFILEDLGDATA pmwfi)
00137 {
00138 pmwfi->IsSave = isSave;
00139 return OpenFileDialogEx (hWnd, 50, 50, 330, 280, pmwfi);
00140 }
00141
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149
00150 #endif
00151
00152