Recent

Author Topic: How to obtain the icon of a Windows shortcut (aka desktop link ) ?  (Read 4497 times)

alejol0

  • Jr. Member
  • **
  • Posts: 60
  • Electronic technician
    • My Facebook page
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!
Contact me: lavarello1966 (at) gmail . com
or
alejandro.lavarello (at) gmail (dot) com

bonmario

  • Sr. Member
  • ****
  • Posts: 346
Re: How to obtain the icon of a Windows shortcut (aka desktop link ) ?
« Reply #1 on: August 24, 2010, 08:13:22 am »
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

 

TinyPortal © 2005-2018