Hi Kieran,
Icons can have transparent and inverted pixels! This patch is not correct, the background has to be painted always.
* dlls/user/static.c: Kieran Clancy <n0dalus+wine at gmail.com http://www.winehq.org/mailman/listinfo/wine-patches> Only set background for icon control when the icon is invalid.
Regards, Michael
On 11/10/05, Michael Kaufmann hallo@michael-kaufmann.ch wrote:
Hi Kieran,
Icons can have transparent and inverted pixels! This patch is not correct, the background has to be painted always.
The current functionality is not correct either then. It works ok for a normal SS_ICON, but if you use SS_CENTERIMAGE with it, it paints the background around the icon where there should be no background. I will experiment with transparent icons and improve my patch. Thankyou for the info.
n0dalus.
Hi,
The current functionality is not correct either then. It works ok for a normal SS_ICON, but if you use SS_CENTERIMAGE with it, it paints the background around the icon where there should be no background. I will experiment with transparent icons and improve my patch. Thankyou for the info.
I've already created a little test program: Windows draws the background behind the icon, but not the entire client area. It should be easy to modify the existing code.
Your second patch (background for bitmaps in static controls) leaks the handle of the brush if GetPixel succeeds. If GetPixel fails you use the brush returned by SendMessage - but my test program shows that Windows doesn't paint the background at all in this case.
Regards Michael
On 11/10/05, Michael Kaufmann hallo@michael-kaufmann.ch wrote:
I've already created a little test program: Windows draws the background behind the icon, but not the entire client area. It should be easy to modify the existing code.
Yes, I see what you are talking about now.
Your second patch (background for bitmaps in static controls) leaks the handle of the brush if GetPixel succeeds. If GetPixel fails you use the brush returned by SendMessage - but my test program shows that Windows doesn't paint the background at all in this case.
I wasn't sure about that. Should I fix my patches and resend them to the list? Can you see anything wrong with my other patches?
Regards Michael
Thankyou for your help, n0dalus.