Customizing ImageList objects
When customizing ImageList
objects, you will see the
following window:
An ImageList object can be loaded by adding a single bit map resource containing all images, or by adding a picture resource (bit map, icon or cursor) for each image. In both cases, the specified resources must exist in the Image Table of the Resource Editor.
If you choose the first option (loading a single bit map), only one bit map resource can be added. The total number of images in the image list will depend on the width of the ImageList object, specified by its ImageWidth property. The bit map to be added must have, at least, the width specified by this property. If less, the bit map will not be added and the corresponding error will be fired.
On the other hand, if you choose the second option (loading a picture for each image), up to 256 pictures can be added. The loaded pictures will be properly resized in order to fit the height and width specified for the image list (see the ImageHeight and ImageWidth properties) and they must be existing resources in the Image Table of the Resource Editor.
IMPORTANT: The BackColor
property for
an image list is used as the background color for drawing images. For
the images to be drawn transparently, set
this value to CLR_NONE,
that is, 0xFFFFFFFF.
REMARKS: The height and width
for an ImageList
object are always
given in pixels
or twips
units depending on the ScaleMode
property of its parent (if its parent is a Window,
MDIWindow
or Picture
object), or its first
ascendant having the ScaleMode
property.
NOTE: You can download
an ImageList
simple project by clicking here.