transparent bitmap on toolbar button 
Author Message
 transparent bitmap on toolbar button

Hi
As subject says I'm trying to make the bitmap have a transparent background on my
toolbar button. I imagine this is done by either setting the mask color or use an
overlay masks. Here is my source. Any help is appreciated.
Thanks ahead of time

    TBADDBITMAP tbab;
    TBBUTTON tbb[2];

hWndToolBar = CreateWindowEx (0,TOOLBARCLASSNAME, NULL,WS_CHILD |
WS_BORDER | WS_VISIBLE,0,0,0,0,  hWndParent,(HMENU) ID_TOOLBAR, hInst,NULL);

SendMessage(hWndToolBar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);

  tbab.hInst = hInst;
  tbab.nID = IDB_TOOLBAR_BITMAP;
  tbb[0].iBitmap = 0;
  tbb[0].fsState = TBSTATE_ENABLED;
  tbb[0].fsStyle = TBSTYLE_BUTTON;
  tbb[0].dwData = 0;
  tbb[0].idCommand = CM_CONNECT_BUTTON;
  tbb[1].iBitmap = 1;
  tbb[1].fsState = TBSTATE_ENABLED;
  tbb[1].fsStyle = TBSTYLE_BUTTON;
  tbb[1].dwData = 0;
  tbb[1].idCommand = CM_DISCONNECT_BUTTON;
  SendMessage(hWndToolBar, TB_ADDBITMAP,2, (LPARAM)&tbab);
  SendMessage(hWndToolBar, TB_ADDBUTTONS, 2, (LPARAM)&tbb);



Tue, 26 Aug 2003 14:16:09 GMT  
 transparent bitmap on toolbar button
You'll need to create an image list. See TB_SETIMAGELIST, ImageList_Create,
ImageList_Add, ImageList_AddMasked
--
With best wishes,
    Igor Tandetnik


Hi
As subject says I'm trying to make the bitmap have a transparent background
on my
toolbar button. I imagine this is done by either setting the mask color or
use an
overlay masks. Here is my source. Any help is appreciated.
Thanks ahead of time

    TBADDBITMAP tbab;
    TBBUTTON tbb[2];

hWndToolBar = CreateWindowEx (0,TOOLBARCLASSNAME, NULL,WS_CHILD |
WS_BORDER | WS_VISIBLE,0,0,0,0,  hWndParent,(HMENU) ID_TOOLBAR, hInst,NULL);

SendMessage(hWndToolBar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);

  tbab.hInst = hInst;
  tbab.nID = IDB_TOOLBAR_BITMAP;
  tbb[0].iBitmap = 0;
  tbb[0].fsState = TBSTATE_ENABLED;
  tbb[0].fsStyle = TBSTYLE_BUTTON;
  tbb[0].dwData = 0;
  tbb[0].idCommand = CM_CONNECT_BUTTON;
  tbb[1].iBitmap = 1;
  tbb[1].fsState = TBSTATE_ENABLED;
  tbb[1].fsStyle = TBSTYLE_BUTTON;
  tbb[1].dwData = 0;
  tbb[1].idCommand = CM_DISCONNECT_BUTTON;
  SendMessage(hWndToolBar, TB_ADDBITMAP,2, (LPARAM)&tbab);
  SendMessage(hWndToolBar, TB_ADDBUTTONS, 2, (LPARAM)&tbb);



Wed, 27 Aug 2003 05:28:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to implement TRANSPARENT Bitmap Buttons

2. How to display Transparent Bitmap Button?

3. how to shape a button to a 24bit bitmap which delete the transparent region and

4. Transparent Bitmap Buttons

5. Transparent Bitmap buttons

6. Transparent Button Bitmap

7. How to implement TRANSPARENT Bitmap Buttons

8. Transparent Owner Drawn Bitmap Button

9. Transparent Bitmap Buttons ?

10. how to make Transparent toolbar button

11. Transparent toolbar buttons

12. Transparent toolbar buttons - color of window

 

 
Powered by phpBB® Forum Software