Shoutbox

[?] Events for Plus Interface Windows - 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: [?] Events for Plus Interface Windows (/showthread.php?tid=81156)

[?] Events for Plus Interface Windows by Spunky on 01-23-2008 at 06:50 PM

Basically, I want to add a textbox to one of MP!Ls own Windows and then when a button is clicked, do stuff. Is it possible to hook messages being sent so that I can do this?


RE: [?] Events for Plus Interface Windows by vikke on 01-23-2008 at 07:09 PM

It's possible, but you would need some way to hook the window. The scripting doesn't support Win32 hook callbacks. If you know C++ you could create your own DLL, and apply the hooks from there.

Basically, just create the button with the MP!L window as parent. Then you replace the WNDPROC (it's called subclassing) with your own (don't forget to call the other WNDPROCs in the chain!). In your WNDPROC-callback, check either for BM_CLICK or BM_CLICKED depending on what window (the MP!L window, or your button's window) you're subclassing.
More information on that message here: http://msdn2.microsoft.com/en-us/library/bb775985.aspx
More information on subclassing (replacing the WNDPROC):
http://msdn2.microsoft.com/en-us/library/ms633570(VS.85).aspx

If you need more help, I can help you out on Messenger if you give me your address. :)