This still doesn't work for me. It still screws up colors and won't make the propers mask. (Win2000 and XP)
I did a simple test: a bitmap with the standard 16 Windows colors. Then added it to the image list with various colours as the transparent colour. For RGB(0,0,0) the colours were completely broken. If the transparent colour had been RGB (255,0,0), RGB (0,255,0), RGB (0,0,255) or RGB (0,128,128), ImageList_AddMasked was simply unable to generate the proper mask. However, for values RGB(255,255,0), RGB(255,0,255), RGB(0,255,255), RGB(128,128,128), RGB(192,192,192) and RGB(255,255,255) it was as it should be.
By the way, according to Microsoft,
"Bitmaps with color depth greater than 8bpp are not supported" for ImageList_AddMasked.
How can we align a image on a button. We are creating imagelist and then adding images to it using ImageList_AddMasked and then sending the message to add the buttons using SendMessage. But the images are rightaligned on the button. Does any one has idea how can we left align or center align a image on the button. This is urgent. Pls. reply asap and pls. copy replies to my ID also.