Skip to content

AddBitmap - cImageList32

Adds a Bitmap to the image list.

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sImage String The image filename being added. It can be a fully-qualified name or the name of a file that can be found in the program's Workspace.
iTransparentColor Integer The RGB color value used as a transparency mask. If you pass IL_AutoTransparency then the color of the top left pixel in the bitmap will be used as the transparency mask color.

Syntax

Function AddBitmap String sImage Integer iTransparentColor Returns Integer

Call Example

Get AddBitmap sImage iTransparentColor to IntegerVariable

Description

Call the AddBitmap function during the OnCreate event to add bitmaps into the image list. Use this function when the bitmap's filename extension is different to the default of .bmp. You would also use this function to specify an explicit transparency color for the bitmap instead of using the color of the top left pixel. In all other cases it is recommended to use the generic AddImage function.

Return Value

The return value is the index of the image that was added. If multiple images are added, then the index of the first image is returned. If the image could not be added, -1 is returned.