[wx-dev] Re: png-bug

Christian Buhtz exsudat at gmx.de
Thu May 1 15:08:55 PDT 2008


Stefan.Neis at t-online.de schrieb:
> 2) Something might be wrong with the png handling. You could try to save the same
>    image in a different (alpha-supporting) format (Tiff?) and see if that works
>    better.

This doesn't work, too. But it depends on inkscape can not export SVGs 
to TIFs. And IrfanView did something wrong with saving PNGs to TIFs.

> for you, I notice that I create my wxStaticBitmap by a process like this:
 > [...]
> i.e. I'm doing an extra step via wxImage - maybe that makes a difference for
> some reason?

It doesn't change anything on the bug. Did your wxStaticBitmap on WinXP 
display transparency?

 > 1) Windows' built-in transparency support is not working for some 
reason for you

It works. Other applications display transparancy. And for example the 
wxMenu display the same PNGs with transparency!

 > In that case, having a look at
 >    msw/statbmp.cpp, more precisely at function wxStaticBitmap::Create
 > [...]
 >    You could try to omit the if (...) line of that, thus always 
calling Connect
 >    to do the painting in wx itself and recompile and see if it helps.

Yes it work very well for wxStaticBitmap. What is about wxTreeCtrl item 
icons? I found nothing like the Connect()-call in the wxTreeCtrl code.

I am quite confused now. For my understanding:
Win2000 and earlier doesn't support transparancy so that wx paint it PNG 
itself to "emulate" transparancy. Right?
WinXP and higher support transparancy. I can see it in some applications 
and in my own wx-application (wxMenu).
But why does wxStaticBitmap doesn't use the XP-buildin transparancy? 
Does the XP-nativ control behind wxStaticBitmap doesn't support it? Or 
don't we know the concret reason?
And what is about the icons in a wxTreeCtrl?

About wxStaticBitmap I wonder if we don't call this Connect() on all 
Windows versions?



More information about the wx-dev mailing list