Adds an image or images to an image list, generating a mask from the specified bitmap.
int ImageList_AddMasked( HIMAGELIST himl, HBITMAP hbmImage, COLORREF crMask );
A handle to the image list.
A handle to the bitmap that contains one or more images. The number of images is inferred from the width of the bitmap.
The color used to generate the mask. Each pixel of this color in the specified bitmap is changed to black, and the corresponding bit in the mask is set to 1.
Returns the index of the first new image if successful, or -1 otherwise.
The ImageList_AddMasked function copies the bitmap to an internal data structure. Bitmaps with color depth greater than 8bpp are not supported. Be sure to use the DeleteObject function to delete hbmImage after the function returns.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|