re: FILE - OPEN - FILTER
I found this below to work. Unfortunately I haven't found out how to add a preview the drawing in the open dialog box. { ********** Macro for loading MI for Win MFC ********** } DEFINE Wui_load_all_files LOCAL Return_string LOCAL File_name WUI_NEW INQ_ENV 10 IF (INQ 19 = 1) {for MFC WUI only} LET Return_string (WUI_FILE_DIALOG CAPTION ("Load MI file") FILTER "All files (*.*)|*.*|") IF (Return_string = 'OK') INQ_ENV 0 LET File_name (INQ 904) {first selected file from file dialog} LOAD File_name END_IF END_IF END_DEFINE { ********** Macro for storing as Compressed MI for Win MFC ********** } DEFINE Wui_store_as_compressed_bi LOCAL Return_string LOCAL File_name INQ_SELECTED_ELEM SELECT ALL CONFIRM IF ((INQ 14)=0) BEEP DISPLAY "The current file is empty. Can not stored file." ELSE INQ_ENV 10 IF (INQ 19 = 1) {for MFC WUI only} LET Return_string (WUI_FILE_DIALOG FILE_SAVE CAPTION ("Store as Compressed MI file") FILTER "Compressed MI (*.bi)|*.bi|All Files (*.*)|*.*||") IF (Return_string = 'OK') INQ_ENV 0 LET File_name (INQ 904) {first selected file from file dialog} STORE ALL DEL_OLD File_name File_name END_IF END_IF END_IF END_DEFINE
|