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 *filename); [in C]
iup.GetFile(filename: string) -> (filename: string, status: number) [in Lua]

filename: 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.

status: The function returns a 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

Notes

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. It also uses a global attribute called "ICON" as the dialog icon if it is defined.

Examples

See Also

IupMessage, IupScanf, IupListDialog, IupAlarm, IupSetLanguage.