[RAPPS] move icon to a field in .txt file (#2941)

* [RAPPS] move icon to a field in .txt file
* [RAPPS] add function PathAppendNoDirEscapeW, apply it.
This commit is contained in:
He Yang 2020-06-30 04:40:40 +08:00 committed by Mark Jansen
parent e636373016
commit 4482d0f455
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
5 changed files with 93 additions and 16 deletions

View file

@ -2394,18 +2394,16 @@ private:
}
/* Load icon from file */
ATL::CStringW szIconPath = szFolderPath;
PathAppendW(szIconPath.GetBuffer(MAX_PATH), L"icons");
PathAppendW(szIconPath.GetBuffer(), Info->m_szName.GetString());
PathAddExtensionW(szIconPath.GetBuffer(), L".ico");
szIconPath.ReleaseBuffer();
hIcon = (HICON) LoadImageW(NULL,
szIconPath.GetString(),
IMAGE_ICON,
LISTVIEW_ICON_SIZE,
LISTVIEW_ICON_SIZE,
LR_LOADFROMFILE);
ATL::CStringW szIconPath;
if (Info->RetrieveIcon(szIconPath))
{
hIcon = (HICON)LoadImageW(NULL,
szIconPath.GetString(),
IMAGE_ICON,
LISTVIEW_ICON_SIZE,
LISTVIEW_ICON_SIZE,
LR_LOADFROMFILE);
}
if (!hIcon || GetLastError() != ERROR_SUCCESS)
{