OPENDLGPARAMS

typedef struct _OPENDLGPARAMS
{
   L_UINT uStructSize ;
   LPOPENDLGFILEDATA pFileData ;
   L_INT nNumOfFiles ;
   L_BOOL bPreviewEnabled ;
   L_BOOL bShowLoadOptions ;
   OPENDLGFILELOADCALLBACK pfnFileLoadCallback ;
   L_VOID L_FAR * pFileLoadCallbackUserData ;
   L_UINT32 uDlgFlags ;
   LTCOMMDLGHELPCB pfnHelpCallback ;
   L_VOID L_FAR * pHelpCallBackUserData ;
} OPENDLGPARAMS, L_FAR* LPOPENDLGPARAMS ;

The OPENDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgOpen 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.

pFileData

Pointer an array of OPENDLGFILEDATA structures, where each item contains a single image file name and its related loading data. You should free this pointer using the GlobalFree function after freeing the allocated data within the structure. Therefore, for all selected files, you must free any allocated data within each structure of the array and then free this pointer.

nNumOfFiles

Number of image file(s) selected in the Open dialog.

bPreviewEnabled

Value that indicates whether to show the Preview window, if DLG_OPEN_SHOW_PREVIEW is set in uDlgFlags. Possible values are:

 

Value

Meaning

 

TRUE

View the preview window.

 

FALSE

Hide the preview window.

bShowLoadOptions

Flag that indicates whether to show the load options when pressing the Open button on the dialog. Possible values are:

 

Value

Meaning

 

TRUE

Show the load options when pressing the Open button, and check the Show Load Options check box. This will occur whether or not DLG_OPEN_SHOW_LOADOPTIONS is set in uDlgFlags.

 

FALSE

Don’t show the load options when pressing the Open button, and uncheck the Show Load Options check box.

 

pfnFileLoadCallback

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

pFileLoadCallbackUserData

Void pointer that you can use to pass one or more additional parameters that the File Load 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 L_FAR *. The callback function 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.

uDlgFlags

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

 

Value

Meaning

 

DLG_OPEN_SHOW_CONTEXTHELP

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

 

DLG_OPEN_SHOW_PROGRESSIVE

[0x00000002] The File Load Options will contain the Progressive Passes option.

 

DLG_OPEN_SHOW_MULTIPAGE

[0x00000004] The File Load Options will contain the Multipage options.

 

DLG_OPEN_SHOW_LOADROTATED

[0x00000008] The File Load Options will contain the Load Rotated option.

 

DLG_OPEN_SHOW_LOADCOMPRESSED

[0x00000010] The File Load Options will contain the load compressed option.

 

DLG_OPEN_SHOW_FILEINFO

[0x00000020] Dialog should have the FileInfo button.

 

DLG_OPEN_SHOW_PREVIEW

[0x00000040] Dialog should have a preview window to preview the selected file image.

 

DLG_OPEN_SHOW_DELPAGE

[0x00000080] Dialog should have a delete button to delete a page in a multi-page image file.

 

DLG_OPEN_SHOW_LOADOPTIONS

[0x00000100] Dialog should contain the "Show Load Options" check box

 

DLG_OPEN_VIEWTOTALPAGES

[0x00010000] Show the total number of pages on the file info dialog.

 

DLG_OPEN_ENABLESIZING

[0x00020000] Dialog should contain the Enable Sizing option.

 

DLG_OPEN_NOFILEMUSTEXIST

[0x00040000] Do not verify that the file exists.

 

DLG_OPEN_NOPATHMUSTEXIST

[0x00080000] Do not verify that the path exists.

 

DLG_OPEN_USEFILESTAMP

[0x00100000] Dialog should preview the stamp in the image file, if it contains a stamp and DLG_OPEN_SHOW_PREVIEW flag is passed.

 

DLG_OPEN_LOADBITMAP

[0x00200000] Load the image when the Open button is pressed and put it in pBitmap.

 

DLG_OPEN_GENERATETHUMBNAIL

[0x00400000] Generate the image thumbnail or create one when the Open button is pressed and put it in pThumbnail.

 

DLG_OPEN_ALWAYSLOADCOMPRESSED

[0x00800000] Load all files compressed. The OPENDLGFILEDATA. bLoadCompressed member will be initialized with TRUE and will be updated with TRUE for all files loaded in the Open dialog, unless the settings are changed in the Load Options dialog. The Load Options dialog is displayed when the Open button is pressed in the Open dialog if the OPENDLGPARAMS. bShowLoadOptions member is set to TRUE, or the "Show Options on Open" check box has been checked in the Open dialog.

 

DLG_OPEN_ALWAYSLOADROTATED

[0x01000000] Load all files in their rotated state, if the image was saved with a rotated view perspective in the file. The OPENDLGFILEDATA. bLoadRotated member will be initialized with TRUE and will be updated with TRUE for all files loaded in the Open dialog, unless the settings are changed in the Load Options dialog. The Load Options dialog is displayed when the Open button is pressed in the Open dialog if the OPENDLGPARAMS. bShowLoadOptions member is set to TRUE, or the "Show Options on Open" check box has been checked in the Open dialog.

 

DLG_OPEN_LOADANY

[0x04000000] Force the Open dialog to return the file name even if it is not a bitmap.

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 L_FAR *. 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