SetTitle

InstallShield 2024 » InstallScript Language Reference

Project:This information does not apply to Basic MSI projects.

The SetTitle function displays a title either in the main window's title bar or inside the main window, depending on the value of nColor.

Tip:To set the background color of your setup, call SetColor.

To set the font and font style of the title displayed inside the background window, call SetFont.

Syntax

SetTitle ( szTitle, nPointSize, nColor );

Parameters

SetTitle Parameters

Parameter

Description

szTitle

Specifies a title to appear either in the main window's title bar or inside the main window. If the title is to appear in the window's title bar, you must specify the predefined constant BACKGROUNDCAPTION in the third parameter. A title bar title that does not fit the available space will be displayed truncated on the right and terminated with ellipses. The default title bar title is “Setup”.

Note:The BACKGROUNDCAPTION option is supported for backward compatibility only. The recommended method for setting the main window's title bar is to set the value of the system variable IFX_SETUP_TITLE.

When a color value is passed in the third parameter, the title is displayed left aligned at the top of the main window. Titles that are too wide for the main window will be displayed truncated on the right. To create a title that occupies more than one line, embed newline characters where you want the line to break.

nPointSize

Specifies the size, in points, of a title to be displayed in the main window. The suggested size is 24 points. Note that this parameter is ignored when the third parameter is BACKGROUNDCAPTION.

nColor

Specifies either a color or the predefined constant BACKGROUNDCAPTION.

Note:Calling SetTitle with the nColor set to BACKGROUNDCAPTION has no effect on setups that do not run in window mode. To run your setup in a standard window, you must first call Enable with the parameter DEFWINDOWMODE or FULLWINDOWMODE and then display the window by calling Enable with the parameter BACKGROUND.

To indicate that the value of szTitle should be displayed in the title bar of the main window, pass the predefined constant BACKGROUNDCAPTION in this parameter. When you specify BACKGROUNDCAPTION, nPointSize is ignored; the color and size of the title bar title are determined by the end user's system settings. Note that this option has no effect on setups that do not run in window mode.
To indicate that the value of szTitle should be displayed inside the setup window, specify a color for that title by passing one of the following constants (whose corresponding RGB values are given in parentheses) or calling the RGB function to indicate a particular custom color.

BLACK—(0, 0, 0)

BLUE—(0, 0, 255)

GREEN—(0, 255, 0)

MAGENTA—(255, 0, 127)

RED—(255, 0, 0)

WHITE—(255, 255, 255)

YELLOW—(255, 255, 0)

Note:Magenta is not part of the standard Windows 16-color palette.

Return Values

SetTitle Return Values

Return Value

Description

0

Indicates that the function successfully set the title of the setup.

< 0

Indicates that the function was unable to set the title of the setup.

See Also