Lazarus

Programming => LCL => Topic started by: Alexandr F on February 21, 2016, 06:14:51 pm

Title: ShellTreeView and system icons
Post by: Alexandr F on February 21, 2016, 06:14:51 pm
I would like to use ShellTreeView with system icons (like in Windows Explorer). I use Windows.

I try next:
 
IconListHandle := SHGetFileInfo('', 0, FileInfo, SizeOf(FileInfo), SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
TreeView_SetImageList(ShellTreeView1.Handle, IconListHandle, TVSIL_NORMAL );

But icons are not displayed. In Delphi 7 this code work properly, icons are displayed.

I'm try to read back a handle of Imagelist form ShellTreeView:

IconListHandle := TreeView_GetImageList(ShellTreeView, TVSIL_NORMAL );

and IconListHandle always is zero (I think should be not zero).
Title: Re: ShellTreeView and system icons
Post by: PeterX on November 22, 2017, 03:40:18 pm
http://forum.lazarus.freepascal.org/index.php/topic,12300.msg62917.html#msg62917