LCL/ShellCtrls: Undo r64821 #3ff38bdc82 for the ShellTreeView (does not display overlay icons; no speed advantage in contrast to ShellListView)

git-svn-id: trunk@64823 -
This commit is contained in:
wp 2021-03-16 09:28:30 +00:00
parent bdc78cd5af
commit 77c4956c67

View File

@ -60,11 +60,9 @@ function GetShellIcon(const AFileName: WideString): TIcon;
var
FileInfo: TSHFileInfoW;
imgHandle: DWORD_PTR;
attr: LongInt;
begin
attr := FileGetAttr(AFileName);
imgHandle := SHGetFileInfoW(PWideChar(AFileName), attr, FileInfo, SizeOf(FileInfo),
SHGFI_ICON or SHGFI_SMALLICON or SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES);
imgHandle := SHGetFileInfoW(PWideChar(AFileName), 0, FileInfo, SizeOf(FileInfo),
SHGFI_ICON or SHGFI_SMALLICON or SHGFI_SYSICONINDEX);
if imgHandle <> 0 then
begin
Result := TIcon.Create;