Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions >


Previous pageReturn to chapter overviewNext page


ImageList dedicated functions


An ImageList is a structure which contains any number of graphical images, either bitmaps or icons, but not a mixture.


All of the images are automatically converted to the type, size, and color depth specified when the ImageList is created.

A bitmap (file type *.BMP) is a single color image, while an icon (file type *.ICO) supports transparency by including both a color bitmap and a mask bitmap.

The mask bitmap is a monochrome image (one bit per pixel), where each "set" bit describes a pixel which remains transparent.

The ImageList structure can best be described as a set, or array, of images. You can retrieve the images individually by index number, or pass the entire ImageList to a control which requires it.


An empty ImageList is first created with ImageList_New.  Images are then added with ImageList_Add, until the structure is complete.  If you add an image which is wider than the size specified by width, the image is separated into multiple bitmaps, each of which is added in sequence. When an ImageList is attached to a control like LISTVIEW, it is usually destroyed automatically when the control is destroyed. Consult the control documentation for that information.  If not, you must explicitly destroy it with ImageList_Kill.