mirror of
https://github.com/reactos/reactos.git
synced 2025-06-11 04:47:22 +00:00
[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:
parent
e636373016
commit
4482d0f455
5 changed files with 93 additions and 16 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue