Fixed SHGFI_SYSICONINDEX flag handling.

This commit is contained in:
Carlos Lozano 2002-10-30 23:39:32 +00:00 committed by Alexandre Julliard
parent 0cf753385b
commit dc60324d9a
2 changed files with 16 additions and 7 deletions

View File

@ -410,13 +410,21 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{
if (!strcmp("%1",sTemp)) /* icon is in the file */
strcpy(sTemp, path);
IconNotYetLoaded=FALSE;
/* FIXME: is it working correctly? */
PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
(flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
if (flags & SHGFI_SYSICONINDEX)
{
psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr);
if (psfi->iIcon == -1) psfi->iIcon = 0;
}
else
{
IconNotYetLoaded=FALSE;
PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
(flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
psfi->iIcon = dwNr;
}
}
}
}

View File

@ -54,6 +54,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList)
BOOL SIC_Initialize(void);
void SIC_Destroy(void);
BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex);
INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex );
/* Classes Root */
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);