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 var
FileInfo: TSHFileInfoW; FileInfo: TSHFileInfoW;
imgHandle: DWORD_PTR; imgHandle: DWORD_PTR;
attr: LongInt;
begin begin
attr := FileGetAttr(AFileName); imgHandle := SHGetFileInfoW(PWideChar(AFileName), 0, FileInfo, SizeOf(FileInfo),
imgHandle := SHGetFileInfoW(PWideChar(AFileName), attr, FileInfo, SizeOf(FileInfo), SHGFI_ICON or SHGFI_SMALLICON or SHGFI_SYSICONINDEX);
SHGFI_ICON or SHGFI_SMALLICON or SHGFI_SYSICONINDEX or SHGFI_USEFILEATTRIBUTES);
if imgHandle <> 0 then if imgHandle <> 0 then
begin begin
Result := TIcon.Create; Result := TIcon.Create;