http://bugs.winehq.org/show_bug.cgi?id=20145
--- Comment #11 from Wilfried Pasquazzo wilfried.pasquazzo@gmail.com 2009-11-20 09:05:45 --- Sorry for the long response times.
No, I didn't resend the patch yet, because I first wanted to search a bit more what the actual bug for this bad drawing of the icon is, instead of just avoiding the faulty part of the program that triggers it.
The problem is clearly related to the memcpy() between from the icons bitmap to the DIBSection. It seems that the DIBSection requires each line of the image to be at least 32 bit big, even if it is set to 1 bpp. The 1 bpp icon is however only aligned to 16 bit. Therefore the DIBSection simply ignored every other line of the icon when blitting, "thinking" those lines were just padding.
This problem therefore occurs only for small icons with very low bpp, like the 8x8 1 bpp icon used in the test program. 32-bit icons are always aligned anyway.
I'll write a new patch that directly targets this problematic line with memcpy().