[YAROTOWS] Reintegrate the branch. For a brighter future.
[reactos.git] / reactos / dll / win32 / user32 / windows / draw.c
index 2eb68d1..dd50c75 100644 (file)
@@ -37,8 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user32);
 
 /* GLOBALS *******************************************************************/
 
-#define DSS_DEFAULT 0x0040  /* Make it bold */
-
 static const WORD wPattern_AA55[8] = { 0xaaaa, 0x5555, 0xaaaa, 0x5555,
                                        0xaaaa, 0x5555, 0xaaaa, 0x5555 };
 
@@ -1375,9 +1373,9 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp,
     }
 
     if (flags & DSS_DISABLED)
-        hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
+        hbrtmp = GetSysColorBrush(COLOR_3DHILIGHT);
     else if (flags & DSS_DEFAULT)
-        hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW));
+        hbrtmp = GetSysColorBrush(COLOR_3DSHADOW);
 
     /* Draw light or dark shadow */
     if (flags & (DSS_DISABLED|DSS_DEFAULT))
@@ -1390,13 +1388,11 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp,
         if(!BitBlt(hdc, x+1, y+1, cx, cy, memdc, 0, 0, 0x00B8074A))
             goto cleanup;
         SelectObject(hdc, hbsave);
-        DeleteObject(hbrtmp);
-        hbrtmp = 0;
     }
 
     if (flags & DSS_DISABLED)
     {
-        hbr = hbrtmp = CreateSolidBrush(GetSysColor(COLOR_3DSHADOW));
+        hbr = hbrtmp = GetSysColorBrush(COLOR_3DSHADOW);
         if(!hbrtmp)
             goto cleanup;
     }
@@ -1420,8 +1416,6 @@ cleanup:
         SelectObject(hdc, hbsave);
     if(hbmsave)
         SelectObject(memdc, hbmsave);
-    if(hbrtmp)
-        DeleteObject(hbrtmp);
     if(hbm)
         DeleteObject(hbm);
     if(memdc)