- Fix draw of cursors in static controls

- Last part of fix for bug #4874

svn path=/trunk/; revision=50398
This commit is contained in:
Matthias Kupfer 2011-01-16 12:51:14 +00:00
parent 44f8ef985c
commit 030dbb0bbc

View file

@ -863,7 +863,15 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
else
{
BITMAP bm;
if (!GetObjectW(info.hbmColor, sizeof(BITMAP), &bm)) return;
if (info.fIcon)
{
GetObjectW(info.hbmColor, sizeof(BITMAP), &bm);
}
else
{
bm.bmWidth = GetSystemMetrics(SM_CXCURSOR);
bm.bmHeight = GetSystemMetrics(SM_CYCURSOR);
}
if (style & SS_CENTERIMAGE)
{
iconRect.left = (rc.right - rc.left) / 2 - bm.bmWidth / 2;