CtrlDir

InstallShield 2014 » InstallScript Language Reference

The CtrlDir function fills a list box or a combo box control with a file listing that matches the specified path or file name in szDir. You can include names of files, subdirectories, and disk drives in the listing. The CtrlDir function works only with custom dialogs.

Syntax

CtrlDir ( szDialogName, nControlID, szDir, nItems );

Parameters

CtrlDir Parameters

Parameter

Description

szDialogName

Specifies the name of a dialog.

nControlID

Specifies the resource ID of the list box or combo box control.

szDir

Specifies the fully qualified path or file name, which may include wildcard characters.

nItems

Specifies the type of listing to display in the control. Pass one or more of the following predefined constants in this parameter. To include more than one type of element, combined these constants with the bitwise OR operator (|):

DLG_DIR_FILE—Creates a list of files matching the file specification szDir.
DLG_DIR_DIRECTORY—Creates a list of subdirectories that exist in the path specification szDir.
DLG_DIR_DRIVE—Creates a list of drives.

Return Values

CtrlDir Return Values

Return Value

Description

0

CtrlDir successfully filled the specified control in a dialog.

< 0

CtrlDir was unable to fill the specified control.

See Also