AddImage - cImageList32
Adds an icon, bitmap or cursor 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. |
Syntax
Function AddImage String sImage Returns Integer
Call Example
Get AddImage sImage to IntegerVariable
Description
Call the AddImage function during the OnCreate event to add bitmap, icon, or cursor images into the image list. The type is determined by the file extension in the passed image name: .bmp = bitmap, .ico = icon, .cur = cursor.
For bitmaps the top left pixel is used to identify the transparent color. Semi-transparent pixels in alpha-blend icons are rendered as black pixels.
Return Value
The return value is the index of the image that was added. If the image could not be added, -1 is returned.