From ef416559911064ca2cf7b6b90fee2640b4dde597 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 12 Aug 2011 10:07:16 +0000 Subject: [PATCH] [USER32] - Simplify finding the icon size in IntDrawState - As a bonus, it now works for black and white icons too svn path=/trunk/; revision=53193 --- reactos/dll/win32/user32/windows/draw.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/reactos/dll/win32/user32/windows/draw.c b/reactos/dll/win32/user32/windows/draw.c index 63240c99847..ddf43102dd9 100644 --- a/reactos/dll/win32/user32/windows/draw.c +++ b/reactos/dll/win32/user32/windows/draw.c @@ -1254,7 +1254,6 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp, if(!cx || !cy) { SIZE s; - ICONINFO ici; BITMAP bm; switch(opcode) @@ -1270,14 +1269,8 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp, 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: