Author: dquintana
Date: Tue Dec 16 18:21:48 2014
New Revision: 65683
URL:
http://svn.reactos.org/svn/reactos?rev=65683&view=rev
Log:
[SHELL32]
* Use PrivateExtractIconsW instead of PrivateExtractIconExW to obtain the icons for
caching. Fixes small shell icons using large icons scaled down instead of the proper 16px
icons. Patch by Ismael Ferreras Morezuelas (swyter).
CORE-8404 #resolve #comment Commited in r65683. Thanks.
Modified:
trunk/reactos/dll/win32/shell32/iconcache.cpp
Modified: trunk/reactos/dll/win32/shell32/iconcache.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/iconcach…
==============================================================================
--- trunk/reactos/dll/win32/shell32/iconcache.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/iconcache.cpp [iso-8859-1] Tue Dec 16 18:21:48 2014
@@ -392,23 +392,9 @@
HICON hiconLarge=0;
HICON hiconSmall=0;
UINT ret;
- static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL;
-
- if (!PrivateExtractIconExW)
- {
- HMODULE hUser32 = GetModuleHandleA("user32");
- PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT))
GetProcAddress(hUser32, "PrivateExtractIconExW");
- }
-
- if (PrivateExtractIconExW)
- {
- PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge,
&hiconSmall, 1);
- }
- else
- {
- PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL,
1, 0);
- PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL,
1, 0);
- }
+
+ PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1,
LR_COPYFROMRESOURCE);
+ PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1,
LR_COPYFROMRESOURCE);
if ( !hiconLarge || !hiconSmall)
{