ShowOpenDlg method (ILEADRasterDlgFile)

Visual Basic example

Visual C++ example

 

Syntax

short ShowOpenDlg(long hWnd);

Overview

Refer to Using Imaging Common Dialogs

Remarks

Displays the Open dialog for getting the filename to open, file information, and applicable options.

You may want to set one or more of the following properties prior to calling this method:

Filter property

FilterIndex property

FileName property

InitialDir property

DialogTitle property

FileDlgFlags property

Available options for the FileDlgFlags property are:

Value

Meaning

OPEN_ALLOWMULTI

[0x00000200] allow selection of multiple files

OPEN_NOCHANGEDIR

[0x00000008] restore directory to original after closing

The layout and action of the dialog depends on the flags set in the UIFlags property. Possible options are:

Value

Meaning

OPEN_SHOW_CONTEXTHELP

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

OPEN_SHOW_PROGRESSIVE

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

OPEN_SHOW_MULTIPAGE

[0x00000004] the File Load Options will contain the Multi-page options.

OPEN_SHOW_LOADROTATED

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

OPEN_SHOW_LOADCOMPRESSED

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

OPEN_SHOW_FILEINFO

[0x00000020] dialog should have the File-Info button.

OPEN_SHOW_PREVIEW

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

OPEN_SHOW_DELPAGE

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

OPEN_SHOW_LOADOPTIONS

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

OPEN_VIEWTOTALPAGES

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

OPEN_ENABLESIZING

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

OPEN_NOFILEMUSTEXIST

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

OPEN_NOPATHMUSTEXIST

0x00080000] Do not verify that the path exists.

OPEN_USEFILESTAMP

[0x00100000] dialog should preview the stamp in the image file, if it contains a stamp.

OPEN_LOADBITMAP

[0x00200000] Load the image when the Open button is pressed and fill the Main control Bitmap property.

OPEN_GENERATETHUMBNAIL

[0x00400000] Generate the image thumbnail or create one when the Open button is pressed and update the Thumbnail property.

OPEN_LOADANY

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

If you include OPEN_LOADBITMAP in the UIFlags property, the Common Dialog Bitmap property must be assigned a valid bitmap before calling this method.

If the UIFlags property contains OPEN_LOADBITMAP and the FileDlgFlags property does not contain OPEN_ALLOWMULTI, the LEADDlgFile.Bitmap property will be updated with the loaded bitmap.

If OPEN_SHOW_PREVIEW or OPEN_USEFILESTAMP is set in the UIFlags property and the EnableShowPreview property is set to VARIANT_TRUE, the "Enable Preview" box in the Open dialog box will be checked.

To initialize the "Load Rotated" box, the "Load Compressed" box and the "Page No." box when the dialog is displayed, set the following properties before calling this method:

PageNumber property

LoadRotated property

LoadCompressed property

Note:

If you set the PageNumber property prior to calling the ShowOpenDlg method, the value you put in PageNumber will appear when the dialog is created. If you then select a file, which has fewer pages, the maximum number of pages for that file will appear in the "Page No.:" box.

The following properties are associated with this method:

Filter property

FilterIndex property

FileName property

DialogTitle property

FileDlgFlags property

InitialDir property

EnableShowPreview property

OptionsFileType property

Bitmap property

Thumbnail property

PageNumber property

LoadPasses property

LoadCompressed property

LoadRotated property

EnableShowLoadOptions property

PCDResolution property

PDFXResolution property

PDFXResolution property

PDFYResolution property

PDFDisplayDepth property

PDFTextAlpha property

PDFGraphicsAlpha property

RasterXResolution property

RasterYResolution property

WMFXResolution property

WMFYResolution property

VectorViewportWidth property

VectorViewportHeight property

VectorViewportMode property

VectorFont property

DXFViewportWidth property

DXFViewportHeight property

DXFViewportMode property

DXFFont property

DXFAutoCADColorScheme property

PLTViewportWidth property

PLTViewportHeight property

PLTViewportMode property

PLTFont property

PLTPenWidth property

PLTPenColor property

To include a Help button in the dialog, set the ShowHelpButton property to VARIANT_TRUE.

The Open dialog can be seen below:

image\Open.gif

See Also

Elements

ShowSaveDlg method