Forum > General

How to obtain the icon of a Windows shortcut (aka desktop link ) ?


I still trying to mimic the Widows desktop under WineXO ( ).

Well, I have some success with a form and TImages and labels, and I can create shortcuts ( .lnk files)
in the users Desktop directory using IShellLink and IPersistFile.

But , because icons are not showed by standard WineXO desktop, I need some way to
obtain the icon of each shortcut for display them.

I have tried the function GetIconLocation with no succes, because my lack of knowledge of using Windows API in Lazarus.

Then, have tried ExtractAssociatedIcon,
that works one time but something I did and not work more. (And not work with links to .doc files or
other files that do not contain icons).

I appreciate any clue. Thanks!

This works with files exe:,2140.msg50014.html#msg50014

You can try if it works also with shortcut.

Hi, Mario


[0] Message Index

Go to full version