SetColor

InstallShield 2015 » InstallScript Language Reference

The SetColor function sets the color of the setup background.

Note: This function is not supported for use in Basic MSI setup projects.

Syntax

SetColor ( nObject, nColor );

Parameters

SetColor Parameters

Parameter

Description

nObject

Specifies the user interface object to change. Pass the following predefined constant in this parameter:

BACKGROUND—Indicates the background of the setup window. The default color is solid teal: RGB (0,128,128).

nColor

Specifies a color for the background.

For a gradient background color, pass one of the following constants:

BK_BLUE
BK_GREEN
BK_MAGENTA
BK_ORANGE
BK_PINK
BK_RED
BK_YELLOW

For a solid background color, pass one of the following constants or call the RGB function to indicate a particular color (using the values provided in the parentheses):

BK_SOLIDBLACK (0, 0, 0)
BK_SOLIDBLUE (0, 0, 255)
BK_SOLIDGREEN (0, 255, 0)
BK_SOLIDMAGENTA (255, 0, 127)
BK_SOLIDORANGE (255, 127, 0)
BK_SOLIDPINK (255, 0, 255)
BK_SOLIDRED (255, 0, 0)
BK_SOLIDWHITE (255, 255, 255)
BK_SOLIDYELLOW (255, 255, 0)

For a custom color, pass the function RGB in this parameter.

Note: When using an RGB value, you can apply the same method as described in the programming manuals for Microsoft Windows. You specify the mixture of RED, GREEN, and BLUE colors to “mix” the color. Use a number from 0 to 255 to represent the amount of color to use. You must use literal numbers in the parameters of the RGB macro. You can also use a long value that represents the RGB color instead of the RGB statement.
To achieve a smoothing effect (gradient) when the background is painted with a custom color, bitwise OR the color with the predefined constant BK_SMOOTH. Note that the smoothing effect is better with 256 colors enabled.

Return Values

SetColor Return Values

Return Value

Description

0

Indicates that the function successfully set the color of the object.

< 0

Indicates that the function was unable to set the color of the user interface object.

See Also