Forum > General

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

(1/1)

alejol0:
I still trying to mimic the Widows desktop under WineXO ( http://wiki.winehq.org/SugaredWine ).

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!

bonmario:
This works with files exe: http://forum.lazarus.freepascal.org/index.php/topic,2140.msg50014.html#msg50014

You can try if it works also with shortcut.

Hi, Mario

Navigation

[0] Message Index

Go to full version