Transparent toolbar buttons - color of window 
Author Message
 Transparent toolbar buttons - color of window

I figured I would post this here because I searched the news group and
was not able to find it anywhere.  Maybe it will help someone
somewhere ;)

I'm using a CToolBarCtrl and I needed to create a toolbar with
transparent 256 colour buttons, ie. buttons with a background colour
COLOR_3DFACE.  I tried using LoadMapped bitmap.. but that did not work
and neither did Image Lists (they could not map colours of bitmaps with
more than 16 colours).  This is the code that I ended up using.. my
bitmap has 8 buttons and is 256 pixels long and 23 pixels high.  This
will map the colour of the first pixel of the bitmap to COLOR_3DFACE.

HBITMAP bitmap = (HBITMAP) LoadImage(AfxGetInstanceHandle(),

CBitmap *cbitmap = CBitmap::FromHandle(bitmap);

m_wndToolBar.AddBitmap(8, cbitmap);

Sent via http://www.*-*-*.com/
Before you buy.

Sat, 12 Oct 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Change Toolbar's transparent (screen) color

2. transparent bitmap on toolbar button

3. how to make Transparent toolbar button

4. Transparent toolbar buttons

5. Toolbar buttons' Color

6. background color on toolbar's button

7. Displaying last selected color on toolbar button - 1 attachment

8. Toolbar Button Colors

9. 256 color images on toolbar buttons

10. 256 color toolbar and toggle buttons backgrounds

11. 256 color Toolbar buttons ?

12. ToolBar button color


Powered by phpBB® Forum Software