Shoutbox

How to "OnWindowsFocus" Event - 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: How to "OnWindowsFocus" Event (/showthread.php?tid=94626)

How to "OnWindowsFocus" Event by jackdamuck on 05-21-2010 at 01:10 PM

Hello everyone!

I got a quick question. Is there a way to create some event when a chatwindow comes to focus?
My idea is to change the keyboard layout depending on which person I'm chatting with. For example:

1 Group of Greeks
1 Group of Englishs

So if I bring a chatwindow with a Greek person to the focus, it should change to the greek keyboard layout, for the English to the English keyboard layout, etc.

Any ideas how to create such an event? Or how to use some existing stuff to realise the idea?

Thank you very much in advance!
Regards


RE: How to "OnWindowsFocus" Event by matty on 05-22-2010 at 01:23 PM

Enhancer does this if I am not mistaken. The only real way is to create an external library to subclass the Chat Windows.


RE: How to "OnWindowsFocus" Event by jackdamuck on 05-22-2010 at 11:08 PM

Hmmm, I never did something like that before...any links/help available for that?


RE: How to "OnWindowsFocus" Event by matty on 05-23-2010 at 11:25 PM

Tutorial on How to Let a Script-Callable DLL Handle Scripting Objects


RE: How to "OnWindowsFocus" Event by jackdamuck on 05-24-2010 at 11:51 PM

Hello again!

Thx 4 this tutorial. It gave me more of an insight view.

I solved my problem in a bit different way: by hooking all EVENT_SYSTEM_FOREGROUND events of the MSN process. My callback function sends some notification to a MsgPlus window, which I created in my script. With some function to get the handle of the window which created the event I can just iterate over all existing chatwindows and compare the handles and boom, that solves it.

If someone is interested in my solution, I can post the source of the DLL and my script.

Thanks for your help matty.


RE: How to "OnWindowsFocus" Event by matty on 05-25-2010 at 11:31 AM

May be good to post it so others can learn as well :)