Recent

Author Topic: Minor q (no issue!): fileinfo.iIcon still useful for icon fetch?  (Read 934 times)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 512
I was unsure if i even should tell this qusetion here, because it's not severe and i found a (more or less) working workaround,
but decided to tell it nevertheless because it might be of interest for some others too.

I put the quesiion within the LCL part here (and not within opsys Windows), because it's driven from the LCL skip of the possiblity to assign a system image list to a Imagelist via Handle.
However: system icons can be accessed pretty fine, effective and fast using the TSHFileInfoW hIcon (handle of the sytem icon)
And, more, having the benefit that an icon overlay will be retrieved too, differently to access it via iIcon (index of the system icon) as it had oftenly been practiced with Delphi.
All details of that can fully be read in the thread https://forum.lazarus.freepascal.org/index.php/topic,31625.0.html

That's where my question is placed: in some rare cases it could be _not_ desirable to have an overlay icon implicitely fetched with the icon.
And one  might think about to, so, access it via the old iIcon (fileinfo.iIcon) approach.
Is that possible?  Is it possible to extract or copy an icon from the Window's system image list accessing it via iIcon and not via hIcon?

Plesae note, my question explicitely does _not_ target listviews, and not system context menus via IContextMenu2.

Lazarus 3.2  FPC 3.2.2 Win10 64bit

 

TinyPortal © 2005-2018