By the way. Seems use the library COM
f4::
newIcon:="E:\go-top.ico" ;16x16 icon file
WinGet, winID,id,A
WinGet, ExStyle, ExStyle, ahk_id %winID%
if (ExStyle & 0x8) ; 0x8 is WS_EX_TOPMOST.
{
soundbeep ;just for debugging
WinSet, alwaysontop,off,ahk_id %winID%
SendMessage, 0x80, 0, 0,, ahk_id %winID% ; (0x80 is WM_SETICON).
return
}
else
{
WinSet, alwaysontop,on,ahk_id %winID%
hIcon := DllCall("LoadImage", uint, 0, str, newIcon,uint, 1, int, 0, int, 0, uint, 0x10)
SendMessage, 0x80, 0, hIcon,, ahk_id %winID% ; (0x80 is WM_SETICON).
}
return
I was trying this afternoon to obtain the COM library for facebook logins, but the links were broken.....
I tell for DllCall. I am not sure of course. ....