ImageList_Add
This function adds an image or images to an image list.
int WINAPI ImageList_Add(
HIMAGELIST himl,
HBITMAP hbmImage,
HBITMAP hbmMask );
Parameters
- himl
[in] Handle to the image list. - hbmImage
[in] Handle to the bitmap that contains the image or images. The number of images is inferred from the width of the bitmap. - hbmMask
[in] Handle to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored.
Return Values
The index of the first new image indicates success. –1 indicates failure.
Remarks
The ImageList_Add function copies the bitmap to an internal data structure. Be sure to use the DeleteObject function to delete hbmImage and hbmMask after the function returns.
ImageList_Add does not support device-independent bitmaps (DIBs).
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Commctrl.h | Commctrl.lib, Imgctl.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CreateBitmap, CreateDIBSection, DeleteObject, ImageList_Create, ImageList_Remove
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.