Shoutbox

Mouse events - 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: Mouse events (/showthread.php?tid=61567)

Mouse events by BananushkA on 06-26-2006 at 12:39 PM

Is there anyway to handle mouse events (such as mouse down, mouse up, mouse move etc.) in Messenger Plus! Live windows?
Or, is there a way to select an area (blank area) in a window (like explorer, basically)?


RE: Mouse events by TheGeek on 06-26-2006 at 12:41 PM

Get the handle to the window and subclass it.


RE: Mouse events by Mike on 06-26-2006 at 01:21 PM

quote:
Originally posted by TheGeek
Get the handle to the window and subclass it.
Don't think you can subclass it, because you can't receive messages from subclassing on scripts...
But if you can, I would like to know how :)
RE: RE: Mouse events by TheGeek on 06-26-2006 at 01:37 PM

quote:
Originally posted by Mike
quote:
Originally posted by TheGeek
Get the handle to the window and subclass it.
Don't think you can subclass it, because you can't receive messages from subclassing on scripts...
But if you can, I would like to know how :)

You make a DLL with a wndproc for the window, then you subclass the window.
The new wndproc saves the last position of the mouse in it's own memory, then a script calls another function in the DLL which then reads the x or the y variable and returns it to the script.
RE: RE: RE: Mouse events by BananushkA on 06-26-2006 at 05:47 PM

quote:
Originally posted by TheGeek
quote:
Originally posted by Mike
quote:
Originally posted by TheGeek
Get the handle to the window and subclass it.
Don't think you can subclass it, because you can't receive messages from subclassing on scripts...
But if you can, I would like to know how :)

You make a DLL with a wndproc for the window, then you subclass the window.
The new wndproc saves the last position of the mouse in it's own memory, then a script calls another function in the DLL which then reads the x or the y variable and returns it to the script.


Can you write me a more specific example, please?
RE: Mouse events by TheGeek on 06-27-2006 at 09:43 AM

Well, if you know winapi, it should be easy to do, but apperantly you don't...
1) a C tutorial: http://cplus.about.com/od/beginnerctutoria1/l/blctut.htm
2) a WinApi tutorial: http://winprog.net/tutorial/
3) subclassing: http://www.rpsoftware.net/old/tutorials.php?page=subclass

Follow those tutorials and you should be fine.