[ros-diffs] [mkupfer] 50398: - Fix draw of cursors in static controls - Last part of fix for bug #4874

mkupfer at svn.reactos.org mkupfer at svn.reactos.org
Sun Jan 16 12:51:14 UTC 2011


Author: mkupfer
Date: Sun Jan 16 12:51:14 2011
New Revision: 50398

URL: http://svn.reactos.org/svn/reactos?rev=50398&view=rev
Log:
- Fix draw of cursors in static controls
- Last part of fix for bug #4874

Modified:
    trunk/reactos/dll/win32/user32/controls/static.c

Modified: trunk/reactos/dll/win32/user32/controls/static.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/static.c?rev=50398&r1=50397&r2=50398&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Sun Jan 16 12:51:14 2011
@@ -863,7 +863,15 @@
     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;




More information about the Ros-diffs mailing list