FILECONVERSIONDLGPARAMS

typedef struct _FILECONVERSIONDLGPARAMS
{
   L_UINT uStructSize ;
   L_UINT uOverwrite ;
   LPFILESAVEFORMAT pFileFormats;
   L_INT32 nFileFormatsCount;
   L_TCHAR szDestPath [L_MAXPATH];
   L_TCHAR szAddSrcFilePath [L_MAXPATH];
   L_BOOL bUseLogReport;
   L_BOOL bRemoveSrcFile;
   L_BOOL bShowFullPath;
   L_BOOL bUseOriginalFolder;
   L_TCHAR *pszSrcFileList;
   L_UINT32 uDlgFlags;
   LTCOMMDLGHELPCB pfnHelpCallback;
   L_VOID *pHelpCallBackUserData ;
} FILECONVERSIONDLGPARAMS, * LPFILECONVERSIONDLGPARAMS ;

The FILECONVERSIONDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgFileConversion function. After the user closes the dialog box, this structure is updated with information about the user's selections.

Member

Description

uStructSize

Size of this structure, in bytes. Use the sizeof operator to calculate this value.

uOverwrite

Value that indicates how to handle the existence of a file that has the same converted file name, extension, and path, when converting a file. Possible values are:

 

Value

Meaning

 

DLG_FILECONVERSION_OVERWRITE_ASK

[0] A message box appears each time and asks what to do with this file. It also lets you abort all conversion operations.

 

DLG_FILECONVERSION_OVERWRITE_SKIP

[1] Skip converting this file and go on to the next file.

 

DLG_FILECONVERSION_OVERWRITE_REPLACE

[2] Replace the existing file with the new file.

 

DLG_FILECONVERSION_OVERWRITE_RENAME

[3] Give the new file a different file name from the existing file.

pFileFormats

Pointer to an array of FILESAVEFORMAT structures that will indicate which formats, BPP, and subformats to include in the File Conversion Dialog. The order of the elements in the array indicates the order the items will appear in the FileType drop-down list box. Pass NULL to have LEADTOOLS add all supported formats, BPP, and subformats to the File Conversion Dialog. For more information on available file types, refer to Customizing File Format Lists.

nFileFormatsCount

The number of the items in pFileFormats. This member is ignored if pFileFormats is NULL. For more information on available file types, refer to Customizing File Format Lists.

szDestPath

Character string that contains the path to the folder in which to save the converted file(s).

szAddSrcFilePath

Character string that contains the path to the folder in which the files to be converted are located.

 

bUseLogReport

Flag that indicates whether to view the Log Report after the conversion operation is finished. Possible values are:

 

Value

Meaning

 

TRUE

Display the Log Report after the conversion process.

 

FALSE

Do not display the Log Report after the conversion process.

bRemoveSrcFile

Flag that indicates whether to remove the source file(s) after the conversion operation is finished. Possible values are:

 

Value

Meaning

 

TRUE

Remove the source file after the conversion process has completed.

 

FALSE

Do not remove the source file after the conversion process has completed.

bShowFullPath

Flag that indicates whether to view the file name and path in the source File(s) list or just the file name. Possible values are:

 

Value

Meaning

 

TRUE

Show the file name and the path in the Source Files List.

 

FALSE

Show only the file name in the Source Files List.

bUseOriginalFolder

Flag that indicates whether to save the converted file(s) in the same folder as the source file(s). Possible values are:

 

Value

Meaning

 

TRUE

Save the converted file(s) in the same folder as the source file(s).

 

FALSE

Do not save the converted file(s) in the same folder as the source file(s).

 

pszSrcFileList

Pointer to a buffer that contains the directory name and the file names of each of the files that will be in the "Source File(s)" list. The directory and file name strings are separated by NULL, with an extra NULL character after the last file name. For example: "C:\images\\0MyFile.cmp\0MyFile2.cmp\0MyOtherFile.cmp\0MyLastFile.cmp\0\0". Please note that all files must be in the same folder.

uDlgFlags

User interface flags for this dialog, which determine the layout and action of the dialog. Possible values are:

 

Value

Meaning

 

DLG_FILECONVERSION_SHOW_CONTEXTHELP

[0x00000001] Dialog should contain a context sensitive help icon.

 

DLG_FILECONVERSION_SHOW_PREVIEW

[0x00000002] Show a preview of the selected image in the Source File List.

 

DLG_FILECONVERSION_SHOW_LOADOPTIONS

[0x00000004] Dialog should have an "Options" button.

 

DLG_FILECONVERSION_SHOW_FILEINFO

[0x00000008] Dialog should have a "File Info" button.

 

DLG_FILECONVERSION_SHOW_PREVIEW_PAGES

[0x00000010] Dialog should have "<" image\FileConversion-Back.gif and ">"image\FileConversion-Next.gif buttons.

 

DLG_FILECONVERSION_SHOW_RESIZE

[0x00000020] Dialog should have a "Resize" button.

 

DLG_FILECONVERSION_SHOW_ROTATE

[0x00000040] Dialog should have a "Rotate" button.

 

DLG_FILECONVERSION_SHOW_NAMINGTEMPLATE

[0x00000080] Dialog should have a "Naming Template" button.

 

DLG_FILECONVERSION_SHOW_OVERWRITE

[0x00000100] Dialog should have the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_OVERWRITE_ASK

[0x00000200] Dialog should have the "Ask" option in the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_OVERWRITE_SKIP

[0x00000400] Dialog should have the "Skip" option in the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_OVERWRITE_REPLACE

[0x00000800] Dialog should have the "Replace" option in the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_OVERWRITE_RENAME

[0x00001000] Dialog should have the "Rename" option in the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_OVERWRITE_ALL

[0x00001E00] Dialog should have all overwrite options in the "Overwrite" combo.

 

DLG_FILECONVERSION_SHOW_ADD

[0x00002000] Dialog should have an "Add" image\FileConversion-AddFiles.gif button.

 

DLG_FILECONVERSION_SHOW_ADDFOLDER

[0x00004000] Dialog should have an "Add Folder" button image\FileConversion-AddFolder.gif.

 

DLG_FILECONVERSION_SHOW_REMOVE

[0x00008000] Dialog should have a "Remove" button image\FileConversion-Remove.gif.

 

DLG_FILECONVERSION_SHOW_SELECTALL

[0x00010000] Dialog should have a "Select All" button image\FileConversion-SelectAll.gif.

 

DLG_FILECONVERSION_SHOW_DELETEORIGINAL

[0x00020000] Dialog should have a "Delete/Overwrite File(s)" check box in the "Source File(s)" group.

 

DLG_FILECONVERSION_SHOW_NEWFORMATSUPDATES

[0x00040000] Dialog should have the new formats updates for version 15.

 

DLG_FILECONVERSION_ENABLE_SAVE_LOG

[0x00080000] Show Save Log button in the report dialog and enable saving the conversion report to log file.

pfnHelpCallback

Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.

pHelpCallBackUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.