tags:

views:

557

answers:

3

We have created a toolbar. there is a static control on toolbar and we have placed ab icon image over that static control. problem is that static control is having its own color and we are unable to make it transparent with respect to the browser theme color.

so our icon appears to have some background color when browser themes are changed.

A: 

Have you considered looking at overriding WM_CTLCOLOR in your toolbar to return a NULL_BRUSH when painting static control(s)?

Alan
A: 

It's difficult to tell from your question what the problem is, but does this article help? Specifically, the bit on using SetBkMode (TRANSPARENT); from within an OnCtlColor handler.

Bob Moore
A: 

Well derive your own owner drawn static control and use a PNG loaded into a CImage to give you per-pixel alpha.

Failing that it is possible to do what you ask using a maskblt ... but its much easier all round using ATL'S and GDI+'s CImage class :)

Goz