So far I got:
Code: Select all
FilePath = C:\Users\Public\Desktop\Dragon Age Origins.lnk
h_icon := DllCall("Shell32\ExtractAssociatedIcon" (A_IsUnicode ? "W" : "A"), ptr, DllCall("GetModuleHandle", ptr, 0, ptr), str, FilePath, "ushort*", lpiIcon, ptr)
Gui, Add, Text, w32 h32 Y0 X48 hwndmypic1 0x3
SendMessage, STM_SETICON := 0x0170, h_icon, 0,, Ahk_ID %mypic1%
Gui, Show
What I can't understand though is that apparentely h_icon doesn't return the icon path, instead it returns some integer, I guess that's an object reference or something? How do I get it to just return the icon path instead?