Closed wxtrac closed 15 years ago
The current code (2.8.9) tests for GetComCtl32Version() version and not Windows version but probably still evaluates to true under CE (to be honest I don't know what do we return from GetComCtl32Version() there). So your patch probably still makes sense but I wonder why is it needed in the first place, i.e. why doesn't painting the bitmap manually work?
Also, do you know if static bitmap control under CE support alpha? If they do, we should definitely disable this workaround for them but if they don't we should arguably keep it and fix it so that it works there too.
Thanks!
Replying to [comment:1 vadz]:
The current code (2.8.9) tests for GetComCtl32Version() version and not Windows version but probably still evaluates to true under CE (to be honest I don't know what do we return from GetComCtl32Version() there). So your patch probably still makes sense but I wonder why is it needed in the first place, i.e. why doesn't painting the bitmap manually work?
Also, do you know if static bitmap control under CE support alpha? If they do, we should definitely disable this workaround for them but if they don't we should arguably keep it and fix it so that it works there too.
Thanks! I'm not an expert of this, but the question was that my application recompiled using wx2.8.8 and 2.8.9 doesn't work in the right way. The simple patch was found simply examining the differences between previous ed newer releases. Then, by google search I found several notes about using alpha channels in Windows Mobile. One of this is "http://blogs.msdn.com/chrislorton/archive/2006/04/07/570649.aspx". So I believe that effectively the alpha channels are supported only using particular functions and not directly.
I still don't understand why doesn't painting the bitmap manually work under CE but I don't have time to look at it now so I did revert this change for CE even though this is clearly not the right thing to do (transparent bitmaps are still not supported after it).
If anybody can look into this and check what's wrong with the manual painting code under CE it would be great.
Issue migrated from trac ticket # 10093
component: wxMSW-CE | priority: normal | resolution: fixed | keywords: wxStaticBitmap
2008-10-20 15:04:10: lorian60 (Lorenzo Iania) created the issue
I've verified that from version 2.8.8 the behaviour of wxStaticBitmap is wrong due to the patch applied since 2.8.7. I've found that the instructions: // Win9x and 2000 don't draw correctly the images with alpha channel so we // need to draw them ourselves and it's easier to just always do it rather // than check if we have an image with alpha or not if ( wxGetWinVersion() <= wxWinVersion_2000 ) { Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually)); } don't work in wince. So I added a simple:
ifndef WXWINCE
before this block ed obviously an
endif
after. Now it seems to work in the right way again.