ImageList_Add

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > ImageList Control > ImageList Control Creation >

ImageList_Add

 

Description

 

Add an image to an ImageList.

 

Syntax

 

Idx = ImageList_Add(BITMAP, iList, sFileBMP [, sFileMask])

Idx = ImageList_Add(ICON  , iList, sFileIcon)

Idx = ImageList_Add(MASKED, iList, sFileMask [, nRGB])

 

Returns

 

Number

The index position of the added image starting from 1. Zero if operation fails.

 

Parameters

 

Name

Type

Optional

Meaning

ICON

BITMAP

MASKED

Keyword

No


iList

Number

No

Handle of the ImageList to delete.

This is the handle returned by ImageList_New function

sFile...

String

No

Full path to image file (BMP or ICO files only)

 

Last used path will be remembered and used if next image will have no path.

sFileMask

Number

Yes

Full path to image file (BMP or ICO files only)

 

Last used path will be remembered and used if next image will have no path.

nRGB

Number

Yes

Specifies the RGB color used in the bitmap to specify transparent pixels.

Each pixel of that color is changed to the color black, and a mask bitmap is created to describe the transparent pixels.

 

This parameter is optional. If not specified, last indicated values will be used instead.

 

Remarks

 

ImageList_Add internally stores latest used image path. Subsequent calls can avoid to pass full image path but only image name if path is the same of the last used one.

 

Restrictions

 

See also

 

Examples