0
votes

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.

2
What do you mean "browser theme"? The theme in a web browser? How is a browser theme relate to an MFC toolbar? ActiveX? Do you mean Window's themes?Aardvark

2 Answers

1
votes

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

0
votes

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 :)