Commit 7ccc2d25 authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

- Use system metrics to determine icon sizes.

- Move invalid index from 1 to 0.
parent e9f2eb52
......@@ -205,6 +205,13 @@ BOOL SIC_Initialize(void)
{
HICON hSm, hLg;
UINT index;
int cx_small, cy_small;
int cx_large, cy_large;
cx_small = GetSystemMetrics(SM_CXSMICON);
cy_small = GetSystemMetrics(SM_CYSMICON);
cx_large = GetSystemMetrics(SM_CXICON);
cy_large = GetSystemMetrics(SM_CYICON);
TRACE("\n");
......@@ -226,13 +233,13 @@ BOOL SIC_Initialize(void)
for (index=1; index<39; index++)
{
hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, 16, 16,LR_SHARED);
hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, 32, 32,LR_SHARED);
hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_small, cy_small, LR_SHARED);
hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_large, cy_large, LR_SHARED);
if(!hSm)
{
hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(0), IMAGE_ICON, 16, 16,LR_SHARED);
hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(0), IMAGE_ICON, 32, 32,LR_SHARED);
hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_small, cy_small, LR_SHARED);
hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_large, cy_large, LR_SHARED);
}
SIC_IconAppend (swShell32Name, index, hSm, hLg);
}
......@@ -326,7 +333,7 @@ BOOL PidlToSicIndex (
}
if (INVALID_INDEX == *pIndex) /* default icon when failed */
*pIndex = 1;
*pIndex = 0;
return ret;
......
......@@ -34,7 +34,7 @@ BEGIN
END
/* BINRES document.ico */
0 ICON document.ico
1 ICON document.ico
/* {
'00 00 01 00 04 00 10 10 10 00 01 00 04 00 28 01'
'00 00 46 00 00 00 10 10 00 00 01 00 08 00 68 05'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment