ShowFilesAssociationDlg method (LEADDlgFile Control)

C++ Builder example

Delphi 4.0 example

 

Builder Syntax

int ShowFilesAssociationDlg (TWinControl* AOwnerCtrl);

Delphi Syntax

Function ShowFilesAssociationDlg (AOwnerCtrl: TWinControl ): L_INT;

Overview

Refer to Using Imaging Common Dialogs.

Remarks

Displays the File Association dialog, in order to change file association options.

The layout and action of the dialog depends on the flags set in the DlgFlags property. Possible option is:

Value

Meaning

DLG_FILESASSOCIATION_SHOW_CONTEXTHELP

[$00000800] Dialog should contain a context sensitive help icon.

The properties associated with this dialog box are:

Formats property.

SelectedExt property.

ServerAppName property.

Use this dialog to control how the shell treats certain types of files. This lets you link your application to a certain file type, which causes the application to take ownership of that file type.

The properties are used as input only and will not be updated by the dialog.

If the method was successful, then file formats will be associated or de-associated accordingly.

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

The File Association dialog can be seen below:

image\FileAssociation.gif

See Also

Elements:

Formats property, SelectedExt property, ServerAppName property, DlgFlags property, ShowHelpButton property, EnableMethodErrors property

Topics:

Imaging Common Dialogs: Properties, Methods, and Events