This function displays the "Open" dialog which can include a file preview.
[C++Builder] BOOL
IKOpenFileDlg(HWND hWnd, LPTSTR FileName, LPCTSTR FilePath, LPCTSTR
FileExt, BOOL Preview);
[Delphi] function
IKOpenFileDlg(hWnd: HWND; FileName, FilePath, FileExt: PChar;
Preview: LongBool): LongBool;
Parameters
Name | Explanation |
---|---|
hWnd | The window handle |
FileName | The name of the selected file |
FilePath | The name of the directory shown in the "Open" dialog when it is first displayed. If this parameter is blank then the current directory is shown. |
FileExt | This sets the types of files that are shown in the "Open" dialog when it is first displayed. To set multiple file types use a semicolon as a delimiter. Ex: "BMP;JPG". Setting an asteriks "*" will remove the term "All Files" from the dropdown menu in the "Open" dialog. If you surround the file type with "<>" as in "<JPG>" then that file type will be displayed as the default type. |
Preview | Sets the file preview function when the "Open" dialog is first displayed. False (0): No preview, True (nonzero): Preview |
Return Value
Returns True (nonzero) if "Open" is selected. Returns False (0) if "Cancel"is selected.
Explanation
The IKOpenFileDlg function displays the "Open" dialog which can include a file previewThe file set in the FilePath and FileExt parameters will initially be displayed in the dialog box list. By selecting the Open button, the file name and full path are set in the FileName parameter. To reference a vector image in the preview , you must first execute the Ik10VectCom.dll, Ik10VectComA.dll, Ik10VectCom64.dll, or Ik10VectCom64A.dll's IKVectorGdipStart function.