From 030dbb0bbcaef2726457d52243ddf11c5f91c72e Mon Sep 17 00:00:00 2001 From: Matthias Kupfer Date: Sun, 16 Jan 2011 12:51:14 +0000 Subject: [PATCH] - Fix draw of cursors in static controls - Last part of fix for bug #4874 svn path=/trunk/; revision=50398 --- reactos/dll/win32/user32/controls/static.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/controls/static.c b/reactos/dll/win32/user32/controls/static.c index 6d40bbc8d5f..6a2f9cc2685 100644 --- a/reactos/dll/win32/user32/controls/static.c +++ b/reactos/dll/win32/user32/controls/static.c @@ -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;