|
-
December 3rd, 2003, 11:48 PM
#1
ImageList_AddMasked() Question
I'm trying to add icons to the tab strip in my program. If I use ImageList_Add() everything works out fine. But I'm trying to get a transparent color to work. The color that I set for transparent ends up turning black in the app. I've tried several different colors and all of them end up black in the app. I'm pretty sure that I'm doing InageList_Create right.
HIMAGELIST himgl = ImageList_Create(80,
16,
ILC_COLOR8|ILC_MASK,
0,
0);
I've even tried changing the color depth and I still have no luck. Any suggestions on getting some transparent bitmaps?
-
December 5th, 2003, 05:30 AM
#2
I tried it for the lict control and that worked:
ImageList_AddMasked(hImageList, hBitmap, clrTransparent)
The image list was created so:
HIMAGELIST hImages = ImageList_Create(16, 16, ILC_COLORDDB | ILC_MASK, 1, 3);
And then I don't remember why I wrote the following:
ImageList_SetBkColor(hImages, CLR_NONE);
Good luck
-
December 6th, 2003, 06:13 PM
#3
My problem was I was using the wrong flag. I was loading the images as DIBs but in my call to ImageList_Create I was stating them as 8bit color bitmaps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|