formZ SDK | 5.0 API Reference | System | Runtime Library (FZRT) | File

# fzrt_file_get_file_simple

Description

Displays the Get File dialog. This will display a Get File dialog that will select a single file. If the user cancels the dialog, this function will return FZRT_NOERR. The result parameter will indicate the action of the user. The selected file is returned in the file located argument. The files displayed to the user can be filtered using a file dialog filter. The filter is created using fzrt_file_dlg_filter_new and functions. Each entry into the dialog filter should have a unique ID associated with it. The start_id parameter determines which filter entry is used on display of the dialog. If the start_id does not match any of the IDs in the dialog filter, then all files of each type are displayed. If the dialog file filter is NULL, then all files are displayed.

Plugin Prototype

fzrt_error_td fzrt_file_get_file_simple(

const fzrt_floc_ptr | start_folder,
const char * | message,
fzrt_file_dlg_filter_ptr | dlg_filter,
fzrt_int | count,
fzrt_int | start_id,
fzrt_unsigned_int | flags,
fzrt_floc_ptr | file,
fzrt_std_enum * | result )

Parameters

start_folder [Input, Optional]

File locator - start browsing from this folder

message [Input, Optional]

Post this message (or default message if "")

dlg_filter [Input, Optional]

If not NULL a menu with formats appears in the open/close dialogs

count [Input]

Count of entries in the dialog file filter. Ignored if dialog file filter is NULL

start_id [Input]

file filter ID of entry to use when dialog is first display. Ignored if dialog file filter is NULL.

flags [Input]

Unused. Must be 0

file [Result]

file locator of selected file if FZRT_STD_OK returned

result [Result]

FZRT_STD_OK if OK pressed, FZRT_STD_CANCEL if Cancel pressed, FZRT_STD_ERROR otherwise

Returns

FZRT_NOERR is successful, error number otherwise

Availability

5.0.0.0

See Also

fzrt_file_get_multiple_files_begin

Function Set

fz_fzrt_file_fset

Defined in

fzrt_api.h