SdBitmap

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdBitmap function displays a bitmap on a dialog. The maximum allowable size of the bitmap is 440 pixels wide by 275 pixels high. You can also display a message in the SdBitmap dialog, but only if you use a resource editor to modify the SdBitmap dialog resource so that the control that displays the message is made visible.

Syntax

SdBitmap ( szTitle, szMsg, szBitmap );

Parameters

SdBitmap Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title (“Welcome”), pass a null string (“”) in this parameter.

szMsg

Pass a null string (“”) in this parameter unless you use a resource editor to modify the SdBitmap dialog to display a message. See the Additional Information section, below.

szBitmap

Specifies the file name of the bitmap to display and, optionally, a set of bitmap attributes. If bitmap attributes are included, the string passed in this parameter should be formatted as follows:

"bitmap file name;transparent flag;3-D flag;Background color"

bitmap file name—Specifies the name of the bitmap file. If the file name is unqualified (that is, if it does not include a drive designation and path), InstallShield searches for the bitmap in SUPPORTDIR.
transparent flag—Indicates whether to display the bitmap transparently. When this flag is 1 (true), all portions of the bitmap that are magenta (RGB Value: 255,0,255) will be displayed transparently. The default for this parameter is 0 (non-transparent).
3-D flag—Indicates whether to add a 3-D border around the edges of the static field that contains the bitmap. The default for this parameter is 0 (no 3D border).
background color—Indicates the color to use for the background of the static text field. Note that this color will be visible only if the bitmap is smaller than the static text field in which it appears or if the transparent flag is set to 1 and the bitmap has transparent areas. The background color must be expressed as an RGB value, that is, as three numeric values separated by commas.

The following example displays the bitmap from the file MyBitmap.bmp, which is located in the SUPPORTDIR folder. The bitmap is displayed on a black background and has a three-dimensional border. Any parts of the bitmap that are magenta are displayed in the background color of black.

    "MyBitmap.bmp;1;1;0,0,0"

Return Values

SdBitmap Return Values

Return Value

Description

NEXT (1)

Indicates that the end user clicked the Next button.

BACK (12)

Indicates that the end user clicked the Back button.

Additional Information

You can use a resource editor to modify the SdBitmap dialog resource so that a message string passed as the parameter szMsg is displayed in the SdBitmap dialog.

The SdBitmap dialog resource is contained in _isres.dll. The resource contains a static text control that receives the string passed as the parameter szMsg. However, by default this static text control is out of view in the SdBitmap dialog (below the dialog). SdBitmap also uses a static text control to display the bitmap image. You can resize the bitmap image static text control and move the message static text control into view in the dialog. The message in szMsg will then be visible when SdBitmap is called.

Be aware that changing the size of the bitmap image static text control may affect the display of your bitmap image. The bitmap image must be small enough to avoid being clipped when SdBitmap centers it in the bitmap image static text control.

This function does not support transparent bitmaps. If you use a transparent bitmap with this function, the transparent portions are displayed normally.

Metafiles are not supported by SdBitmap.

See Also