[BROWSEUI] -CExplorerBand: Calling ILGetDisplayNameEx with a full pidl was a bit hacky after all because it doesn't work always in win10. Just get the name manually as no helper is good enough.

svn path=/trunk/; revision=75687
This commit is contained in:
Giannis Adamopoulos 2017-08-27 09:35:03 +00:00
parent 93751aff42
commit 3ee6628aa5

View file

@ -574,11 +574,14 @@ HTREEITEM CExplorerBand::InsertItem(HTREEITEM hParent, IShellFolder *psfParent,
/* Get the name of the node */
WCHAR wszDisplayName[MAX_PATH];
if (!ILGetDisplayNameEx(psfParent, pElt, wszDisplayName, ILGDN_INFOLDER))
{
ERR("Failed to get node name\n");
STRRET strret;
hr = psfParent->GetDisplayNameOf(pEltRelative, SHGDN_INFOLDER, &strret);
if (FAILED_UNEXPECTEDLY(hr))
return NULL;
hr = StrRetToBufW(&strret, pEltRelative, wszDisplayName, MAX_PATH);
if (FAILED_UNEXPECTEDLY(hr))
return NULL;
}
/* Get the icon of the node */
INT iIcon = SHMapPIDLToSystemImageListIndex(psfParent, pEltRelative, NULL);