Author: jgardou
Date: Tue Aug 31 16:49:09 2010
New Revision: 48667
URL:
http://svn.reactos.org/svn/reactos?rev=48667&view=rev
Log:
[USER32]
- Use GetSysColorBrush(...) instead of CreateSolidBrush(GetSysColor(...))
Modified:
branches/reactos-yarotows/dll/win32/user32/windows/draw.c
Modified: branches/reactos-yarotows/dll/win32/user32/windows/draw.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/dll/win32/user…
==============================================================================
--- branches/reactos-yarotows/dll/win32/user32/windows/draw.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/dll/win32/user32/windows/draw.c [iso-8859-1] Tue Aug 31
16:49:09 2010
@@ -1373,9 +1373,9 @@
}
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))
@@ -1388,13 +1388,11 @@
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;
}
@@ -1418,8 +1416,6 @@
SelectObject(hdc, hbsave);
if(hbmsave)
SelectObject(memdc, hbmsave);
- if(hbrtmp)
- DeleteObject(hbrtmp);
if(hbm)
DeleteObject(hbm);
if(memdc)