Author: cgutman
Date: Fri Aug 12 10:07:16 2011
New Revision: 53193
URL:
http://svn.reactos.org/svn/reactos?rev=53193&view=rev
Log:
[USER32]
- Simplify finding the icon size in IntDrawState
- As a bonus, it now works for black and white icons too
Modified:
trunk/reactos/dll/win32/user32/windows/draw.c
Modified: trunk/reactos/dll/win32/user32/windows/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] Fri Aug 12 10:07:16 2011
@@ -1254,7 +1254,6 @@
if(!cx || !cy)
{
SIZE s;
- ICONINFO ici;
BITMAP bm;
switch(opcode)
@@ -1270,14 +1269,8 @@
break;
case DST_ICON:
- if(!GetIconInfo((HICON)lp, &ici))
+ if(!get_icon_size((HICON)lp, &s))
return FALSE;
- if(!GetObjectW(ici.hbmColor, sizeof(bm), &bm))
- return FALSE;
- s.cx = bm.bmWidth;
- s.cy = bm.bmHeight;
- DeleteObject(ici.hbmMask);
- DeleteObject(ici.hbmColor);
break;
case DST_BITMAP: