Shoutbox

[help] Setting window icons... - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [help] Setting window icons... (/showthread.php?tid=93700)

[help] Setting window icons... by whiz on 01-29-2010 at 09:21 PM

I've seen it done in Countdown Live, but I can't seem to be able to do it.  There's no error message or anything - nothing happens.

Javascript code:
var ScriptIcon = Interop.Call("user32", "LoadImageW", Interop.Call('kernel32', 'GetCurrentProcess'), MsgPlus.ScriptFilesPath + "\\Icon.ico", 1, 0, 0, 0x10 | 0x20);
var TmpWnd = MsgPlus.CreateWnd("Test.xml", "WndTest", 0);
Interop.Call("user32", "SendMessageW", TmpWnd, 0x80, 0, ScriptIcon);
Interop.Call("user32", "SendMessageW", TmpWnd, 0x80, 1, ScriptIcon);

Am I missing something here, or have I done something wrong?
RE: [help] Setting window icons... by matty on 01-29-2010 at 09:36 PM

Javascript code:
Interop.Call("user32", "SendMessageW", TmpWnd.Handle, 0x80, 0, ScriptIcon);
Interop.Call("user32", "SendMessageW", TmpWnd.Handle, 0x80, 1, ScriptIcon);


RE: [help] Setting window icons... by whiz on 01-29-2010 at 09:42 PM

Ah...  but now it's giving me the WLM icon!  :S


RE: [help] Setting window icons... by matty on 01-29-2010 at 09:43 PM

Is it a custom icon you are using?


RE: [help] Setting window icons... by whiz on 01-29-2010 at 09:48 PM

Yes, and I believe it works since I can set folders to use it.

Edit 1: tried a different icon, that seems to work.  I'll see if I can sort my icon out...
Edit 2: works!  Thanks.  :P