-
If this helps at all, if I switch my style from the Default XP style to another style with my program open, the toolbar is fine, but if I switch my style and then open my program, the toolbar buttons are transparent any more. I'm open for any suggestions that you have, but try to be more specific than get a certain color because I'm not sure what I need to be doing with that color.
-
More info:
If I use RGB(236,233,216) as background color, it appears transparent for Default XP style
If I use RGB(235,233,237) as background color, it appears transparent for Windows Classic and Media Center styles (the only other two styles I have that I can test it with).
Is there a way to set what color is the transparent color? I've read that the top left color of a bitmap is the transparent color, but that isnt happening.
-
Update:
I load the bitmap using ImageList_LoadImage and then send the bitmap through the TB_SETIMAGELIST message and it appears transparent for every style I tried it on. The problem now is that the colors are duller than they are supposed to be.
-
Update:
Using LR_CREATEDIBSECTION as one of the flags worked. I have solved my own problem!!! Thanks for all your help though!!!
EDIT:
Here is my code if you have the same questions:
Code:
HIMAGELIST imageList = ImageList_LoadImage(hInst, MAKEINTRESOURCE(ID_BITMAP), 60, 0, CLR_DEFAULT, IMAGE_BITMAP, LR_CREATEDIBSECTION|LR_LOADTRANSPARENT); // 60 = width of each button image
SendMessage(hTool, TB_SETIMAGELIST, 0, (LPARAM)imageList);