Hi!
Mike McCormack : user32: Remember to draw the icon when SS_CENTERIMAGE is set.
http://www.winehq.org/pipermail/wine-cvs/2006-August/025297.html
We have this...
if (style & SS_CENTERIMAGE)
{
iconRect.left = (rc.right - rc.left) / 2 - bm.bmWidth / 2;
iconRect.top = (rc.bottom - rc.top) / 2 - bm.bmHeight / 2;
iconRect.right = iconRect.left + bm.bmWidth;
iconRect.bottom = iconRect.top + bm.bmHeight;
FillRect( hdc, &iconRect, hbrush ); /* Wine source has &rc */
} ^^^^^---< here!
else
{
FillRect( hdc, &rc, hbrush );
DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
rc.bottom - rc.top, 0, NULL, DI_NORMAL );
}
Wine, after patch,
if (style & SS_CENTERIMAGE)
{
iconRect.left = (rc.right - rc.left) / 2 - info->nWidth / 2;
iconRect.top = (rc.bottom - rc.top) / 2 - info->nHeight / 2;
iconRect.right = iconRect.left + info->nWidth;
iconRect.bottom = iconRect.top + info->nHeight;
}
FillRect( hdc, &rc, hbrush );
DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
rc.bottom - rc.top, 0, NULL, DI_NORMAL );
Funny, he did not notice this and what is all that math for if you are not going to use
it.
We use iconRect wine does not. I did point this out on winehakers. I did not stay
due to the rude behavior of most wine developers.
Making a note here to: not sync this patch to static.c.
Thanks,
James