Mark Harmstone : shell32: Don't hardcode icon sizes in SIC_LoadIcon.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 3 14:52:36 CDT 2015
Module: wine
Branch: master
Commit: 77b75ca14b960f8b36134f0e6e9ad1786f97f296
URL: http://source.winehq.org/git/wine.git/?a=commit;h=77b75ca14b960f8b36134f0e6e9ad1786f97f296
Author: Mark Harmstone <hellas at burntcomma.com>
Date: Sat Aug 1 15:40:05 2015 +0100
shell32: Don't hardcode icon sizes in SIC_LoadIcon.
---
dlls/shell32/iconcache.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index b294908..4549d5b 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -310,8 +310,10 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
HICON hiconLargeShortcut;
HICON hiconSmallShortcut;
- PrivateExtractIconsW( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 );
- PrivateExtractIconsW( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 );
+ PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXICON),
+ GetSystemMetrics(SM_CYICON), &hiconLarge, 0, 1, 0 );
+ PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXSMICON),
+ GetSystemMetrics(SM_CYSMICON), &hiconSmall, 0, 1, 0 );
if ( !hiconLarge || !hiconSmall)
{
More information about the wine-cvs
mailing list