imaqLoadImagePopup
Usage
char** imaqLoadImagePopup(const char* defaultDirectory, const char* defaultFileSpec, const char* fileTypeList, const char* title, int allowMultiplePaths, ButtonLabel buttonLabel, int restrictDirectory, int restrictExtension, int allowCancel, int allowMakeDirectory, int* cancelled, int* numPaths);
Purpose
Displays a file selection dialog box that previews images and waits for the user to select an image file(s) or click Cancel.
Parameters
Name
|
Type
|
Description
|
---|---|---|
defaultDirectory | const char* | The directory that the dialog box opens to. |
defaultFileSpec | const char* | String that specifies the files to display. For example, a value of *.bmp displays all files with the .bmp extension. |
fileTypeList | const char* | String that specifies other file types the user can choose to display, such as .jpg or .png. Use a semicolon (;) or delimiter between each file type extension. |
title | const char* | The title of the dialog box. |
allowMultiplePaths | int | Set this parameter to TRUE to allow the user to select multiple files. Set this parameter to FALSE to allow the user to only select one file. |
buttonLabel | ButtonLabel | The label on the OK button. |
restrictDirectory | int | Set this parameter to TRUE to prevent the user from changing directories or drives. Set this parameter to FALSE to allow the user to change directories or drives. |
restrictExtension | int | Set this parameter to TRUE to limit the user to selecting files with the default extension specified by defaultFileSpec. Set this parameter to FALSE to allow the user to select files with any extension. |
allowCancel | int | Set this parameter to TRUE to allow the user to cancel out of the dialog box. Set this parameter to FALSE to force the user to make a selection before closing the dialog box. |
allowMakeDirectory | int | Set this parameter to TRUE to allow the user to make a new directory from within the dialog box. Set this parameter to FALSE to prevent the user from making a new directory. |
cancelled | int* | On return, specifies whether the user cancelled the dialog box. Set this parameter to NULL if you do not need this information. |
numPaths | int* | On return, the number of files the user selected. Set this parameter to NULL if you do not need this information. |
Return Value
Type |
Description |
---|---|
char** | On success, this function returns an array of file paths that the user selected. The array contains a number of strings equal to the value of numPaths. To get extended error information, call imaqGetLastError(). When you are finished with the array, dispose of it by calling imaqDispose(). |