11-20-2006 08:19 AM
11-20-2006 08:31 AM
Hello,
the FileSelectPopup function is what you are looking for.
// Show the File Selection Popup window.
SetBreakOnLibraryErrors (OFF);
file_select = FileSelectPopup ("", "*.*", "", "Please select file", VAL_SELECT_BUTTON, 0, 0, 1, 0, pathname);
SetBreakOnLibraryErrors (ON);
ProcessDrawEvents (); // Redraw the User Interface after the popup window is gone.
// Check if an error occured while selecting the file.
if (file_select < 0){
MessagePopup ("Error while selecting file.", GetUILErrorString (file_select));
return 0;
}
// Check if user clicked the cancel button.
if (file_select = VAL_NO_FILE_SELECTED) return 0;
// ...