Opens a file selection dialog boxvoid int sm_filebox(char *buffer, int length, char *path, char *file_mask, char *title, int open_save);
- On return, contains the selected file's name. Make sure that
bufferis at least the size specified by
- The length of
- The initial path for the directory tree. If you supply an empty string, the dialog box initially shows the directory in which the Panther application was launched.
- A filter to narrow down the display of files in
path. Use at least one wildcard character. For example, to narrow down the display to all files that have the extension doc, supply
"*.doc" as the argument.
To show all files, supply an empty string.
- The text of the dialog box's title. Supply an empty string to suppress title display.
- Valid only for Windows, determines the title of the file type option menu; ignored by other platforms. The title is platform-specific; for example, in Windows,
FB_OPENsets the title to List Files of Type.
sm_fileboxinvokes a file selection box that lets users choose a file to open or save a file. On GUI platforms, Panther uses the GUI's standard file selection dialog. The dialog box initially displays the contents of the
path-specified directory, and lists files that match the wildcard specification in
file_mask. Users can browse through the directory tree. When the user chooses OK, Panther copies to
bufferthe name of the file to open or save.
If you are running an application on Windows, Panther uses the value of
open_saveto change the title of the file type option menu. You specify the option menu's contents through sm_filetypes.
#define LEN 256
char buf [LEN];
sm_filebox(buf, LEN, "c::\\videobiz", "*.tbl", "", FB_OPEN);