Extensions Reference
Extensions Reference > exDialogs
dlgBrowseForMultiFile
string dlgBrowseForMultiFile(bool IsOpenDialog, string DefExt, string Filters);
Displays a file selection dialog
The DLGBROWSEFORFILE function displays a standard Windows file selection dialog for the user to select or supply multiple filenames. This function can be used for file loading and saving. To force only one file (single selection) to be supplied use dlgBrowseForFile.
Parameters
IsOpenDialog
TRUE if the dialog should be a "File Open" dialog, otherwise FALSE to display a "File Save" dialog.
DefExt
The default file extension to use when no file extension is supplied by the user. For example, using "doc" in this parameter when the user supplies a filename of "Mydoc" will provide an actual filename of "Mydoc.doc".
Filters
This parameter is used to determine the type of filename a file must have to be displayed in the file list box. The first string in the string pair describes the filter; the second string indicates the file extension to use. Multiple extensions may be specified using ';' as the delimiter. The string ends with two '|' characters. This is a sample filter that allows GIF, JPG and BMP images:
GIF images (*.gif)|*.gif|JPEG images (*.jpg)|*.jpg|Bitmap images (*.bmp)|*.bmp||
This is a sample filter that only allows .txt files:
Text files (*.txt)|*.txt||
Return Value
The path and name of the files selected, or an empty string if Cancel was clicked. Each path and filename is delimited by a semicolon, including if only one file was selected. This is a sample return string:
C:\mydoc.txt;C:\anotherfile.txt;C:\test.txt;
Example Code
// Prompt for all files to open
string Files = dlgBrowseForMultiFile(True, "ssn", "Shiny code (*.ssn)|*.ssn||");