Hi Donkey.
I've noticed that some icons on WinXP don't have the correct "transparent" color when the new icon set is in use.
This goes to ButtonChanger and all the icons of other Addins. If in ButtonChanger we put 3d light border color instead of the button face then everything is OK for the 2 user buttons.

What does the addin change in the toolbar properties so it acts this way?

Here is the screenshot:
Posted on 2004-01-20 21:22:01 by Milos
Hi Milos, you cannot have more than one transparency color per image list, the toolbar addin will set the transparency to it's own. I think that I used the same one that Ketil uses, I will have to check.
Posted on 2004-01-20 21:39:02 by donkey
I had that with some Toolbar bitmaps too, then I found Hutch--'s SetBmpColor proc somewhere which takes care of it.



;#########################################################################################
; Is needed for the ToolBar.. sometimes the used background looks weird.. depending on
; what Bitmap you use... From Masm32 folder...
SetBmpColor proc hBitmap:DWORD

LOCAL mDC :DWORD
LOCAL hXXBrush :DWORD
LOCAL hOldBmp :DWORD
LOCAL hReturn :DWORD
LOCAL hOldBrush :DWORD

invoke CreateCompatibleDC,NULL
mov mDC,eax

invoke SelectObject,mDC,hBitmap
mov hOldBmp,eax

invoke GetSysColor,COLOR_BTNFACE
invoke CreateSolidBrush,eax
mov hXXBrush,eax

invoke SelectObject,mDC,hXXBrush
mov hOldBrush,eax

invoke GetPixel,mDC,1,1
invoke ExtFloodFill,mDC,1,1,eax,FLOODFILLSURFACE

invoke SelectObject,mDC,hOldBrush
invoke DeleteObject,hXXBrush

invoke SelectObject,mDC,hBitmap
mov hReturn,eax
invoke DeleteDC,mDC

mov eax,hReturn

ret

SetBmpColor endp


All there is to do is pass the handle of the Toolbar bitmap to it and the weird box around a couple button disappears.
Posted on 2004-01-21 16:40:27 by JimmyClif
Well if you do not use the RadToolbar all icons are displayed correctly but from the very moment you apply(addin manager) phenety icons something happens with them.
Posted on 2004-01-22 14:19:36 by Milos
I'm not sure Milos, I don't have that problem here at all. What OS version are you testing on ? The icons that are already mapped are recolored with COLOR_BTNFACE as the background, the problem could be related to that. I will check but it is difficult as both Win2K and Win98SE seem to display them perfectly on my system.
Posted on 2004-01-22 15:48:47 by donkey
I tried to raplace COLOR_BTNFACE with COLOR_BTNHILIGHT in the ButtonChanger and then it's all fine. It seams that here on XP (with styles enabled) toolbar takes this color once the phoenity icons are set....or something like this. It's strange.
Posted on 2004-01-22 19:57:02 by Milos