user: Use computed icon rectangle if SS_CENTERIMAGE style is set.

This commit is contained in:
Dmitry Timoshkov 2006-09-06 23:00:45 +09:00 committed by Alexandre Julliard
parent bedcdee714
commit 4f28f7967d
1 changed files with 4 additions and 2 deletions

View File

@ -760,9 +760,11 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
iconRect.right = iconRect.left + info->nWidth;
iconRect.bottom = iconRect.top + info->nHeight;
}
else
iconRect = rc;
FillRect( hdc, &rc, hbrush );
DrawIconEx( hdc, rc.left, rc.top, hIcon, rc.right - rc.left,
rc.bottom - rc.top, 0, NULL, DI_NORMAL );
DrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left,
iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL );
}
if (info) GlobalUnlock16(HICON_16(hIcon));
}