This function displays the "Save" dialog which includes the file preview function. This dialog is used to select a directory and file name into which the image date is to be saved.

[Delphi]   function IKSaveFileDlgEx(hWnd: HWND; FileName, FilePath, FileExt: PChar; Preview: LongBool; var FileType: Integer): LongBool;

Parameters

Name Explanation
hWnd The window handle
FileName The name of the selected file or the name of the file initially displayed in the "Save" dialog
FilePath The name of the directory shown in the "Save" 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 "Save" 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 "Save" 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 "Save" dialog is first displayed. False (0): No preview, True (nonzero): Preview
FileType The type of file that has been selected. 1:BMP, 2:JPEG, 3:GIF, 4:TIFF, 5:PNG, 6:FPX, 7:PCX, 8:WMF, 9:EMF, 10:DXF, 11:SVG, 12:JPEG2000, 13:JPEG2000(Code Stream), 14:SXF(p21), 15:SXF(sfc)

Return Value

Returns True (nonzero) if "Save" is selected. Returns False (0) if "Cancel"is selected.

Explanation

The IKSaveFileDlgEx function displays the "Save" dialog which includes the file preview function. This dialog is used to select a directory and file name into which the image date is to be saved.

The FilePath and FileExt parameters set the file that is shown in the list when the "Save" dialog is initially displayed. If the FileName parameter contains the full path, then the FilePath parameter is disabled. By selecting the Save button, the file name and full path are set in the FileName parameter. When the Save button is clicked, FileType parameter returns the type of file that was selected in the "Save" dialog. 

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.

Example:

In C++Builder

   TCHAR FileName[256];
   BOOL Ret;
   int FileType;

   memset(FileName, 0, sizeof(FileName));   //in this case, the FilePath parameter is enabled
   //if the file name and full path are set into the FileName parameter, then the FilePath parameter is disabled
   //lstrcpy(FileName, "C:\\Images\\001.jpg");

   Ret = IKSaveFileDlgEx(Form1->Handle, FileName, "C:\\My Pictures", "*;BMP;JPG;", FALSE, &FileType);

In Delphi

   FileName: array [0..255] of Char;
   Ret: LongBool;
   FileType: Integer;

   FillChar(FileName, SizeOf(FileName), 0);   // in this case, the FilePath parameter is enabled
   //if the file name and full path are set into the FileName parameter, then the FilePath parameter is disabled
   //StrPCopy(FileName, 'C:\Images\001.jpg');
   Ret = IKSaveFileDlgEx(Form1.Handle, FileName, 'C:\My Pictures', '*;BMP;JPG;', False, FileType);

 

The ImageKit10 VCL is a product created by Newtone Corporation