From 44016841cf0a1ee747e1328e4a5de6e62f9b9585 Mon Sep 17 00:00:00 2001 From: Juergen Schmied Date: Fri, 25 Feb 2000 20:52:01 +0000 Subject: [PATCH] Fixed allocation of 16x16 icons. --- objects/cursoricon.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/objects/cursoricon.c b/objects/cursoricon.c index 6d64d18d823..bc5914e4e49 100644 --- a/objects/cursoricon.c +++ b/objects/cursoricon.c @@ -868,7 +868,7 @@ HGLOBAL CURSORICON_ExtCopy(HGLOBAL Handle, UINT nType, } else { - int iTargetCX, iTargetCY; + int iTargetCY = iDesiredCY, iTargetCX = iDesiredCX; LPBYTE pBits; HANDLE hMem; HRSRC hRsrc; @@ -936,8 +936,11 @@ HGLOBAL CURSORICON_ExtCopy(HGLOBAL Handle, UINT nType, pBits = (LPBYTE)LockResource( hMem ); - iTargetCY = GetSystemMetrics(SM_CYICON); - iTargetCX = GetSystemMetrics(SM_CXICON); + if(nFlags & LR_DEFAULTSIZE) + { + iTargetCY = GetSystemMetrics(SM_CYICON); + iTargetCX = GetSystemMetrics(SM_CXICON); + } /* Create a New Icon with the proper dimension */