IupGetFile

IUP - Portable User Interface

IupGetFile

Shows a modal dialog of the native interface system to select a filename. Uses the IupFileDlg element.

Creation and Show

int IupGetFile(char *file); [in C]
IupGetFile(file: string) -> (file: string, error: number) [in IupLua3]
iup.GetFile(file: string) -> (file: string, error: number) [in IupLua5]

file: This parameter is used as an input value to define the default filter and directory. Example: "../docs/*.txt". As an output value, it is used to contain the filename entered by the user.

error: The function returns an error code, whose values can be:

1: The name defined by the user is that of a new file
0: The name defined by the user is that of an already existent file
-1: The operation was cancelled by the user

Note

The IupGetFile function does not allocate memory space to store the complete filename entered by the user. Therefore, the file parameter must be large enough to contain the directory and file names.

The dialog uses a global attribute called "PARENTDIALOG" as the parent dialog if it is defined.

Examples

See Also

IupMessage, IupScanf, IupListDialog, IupAlarm, IupSetLanguage.