how to set transparent color for a perticular color
-
-
hi i need to set transparent color for a perticular color so that when i load bit map the color will be transparent... i am working with mfc tool bar controls how to set default transparent color for a perticular color please let me know thanks in advance
What are you doing exactly ? Where are you using that bitmap and how do you 'display' it ?
Cédric Moonen Software developer
Charting control [v1.2] -
What are you doing exactly ? Where are you using that bitmap and how do you 'display' it ?
Cédric Moonen Software developer
Charting control [v1.2]thanx for the reply i have a bit map lets say smily having red color arrond the smily i wanna put that bit map on the tool bar button but i dont wanna disply the red color i know we can make that red color as transparent color so that it wont be displyed ... but how to set red color as transparent color
-
hi i need to set transparent color for a perticular color so that when i load bit map the color will be transparent... i am working with mfc tool bar controls how to set default transparent color for a perticular color please let me know thanks in advance
use
SetlayeredWindowAttributes()
API to set the red color transparent. might be below link will help you. http://www.codeproject.com/KB/cpp/Greetings.aspx[^][ Screen Capture ][ Tool Tip ][ Muliple Desktops ][Greeting Card ]
-
hi i need to set transparent color for a perticular color so that when i load bit map the color will be transparent... i am working with mfc tool bar controls how to set default transparent color for a perticular color please let me know thanks in advance
For button bitmaps in an MFC toolbar, you can use a masked imagelist to hold the bitmaps.
// in constructor // transparent color is bright green m\_ToolBarImageList.Create(IDB\_BITMAP1, 16, 1, RGB(0x00,0xFF,0x00));
...
// some time after m_ToolBar's is created
m_ToolBar.GetToolBarCtrl().SetImageList(&m_ToolBarImageList);Mark Salsbery Microsoft MVP - Visual C++ :java:
-
For button bitmaps in an MFC toolbar, you can use a masked imagelist to hold the bitmaps.
// in constructor // transparent color is bright green m\_ToolBarImageList.Create(IDB\_BITMAP1, 16, 1, RGB(0x00,0xFF,0x00));
...
// some time after m_ToolBar's is created
m_ToolBar.GetToolBarCtrl().SetImageList(&m_ToolBarImageList);Mark Salsbery Microsoft MVP - Visual C++ :java: