shell32: Don't hardcode icon sizes in SIC_LoadIcon.

This commit is contained in:
Mark Harmstone 2015-08-01 15:40:05 +01:00 committed by Alexandre Julliard
parent 27bffea148
commit 77b75ca14b
1 changed files with 4 additions and 2 deletions

View File

@ -310,8 +310,10 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
HICON hiconLargeShortcut; HICON hiconLargeShortcut;
HICON hiconSmallShortcut; HICON hiconSmallShortcut;
PrivateExtractIconsW( sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, 0, 1, 0 ); PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXICON),
PrivateExtractIconsW( sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, 0, 1, 0 ); GetSystemMetrics(SM_CYICON), &hiconLarge, 0, 1, 0 );
PrivateExtractIconsW( sSourceFile, dwSourceIndex, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), &hiconSmall, 0, 1, 0 );
if ( !hiconLarge || !hiconSmall) if ( !hiconLarge || !hiconSmall)
{ {