I've done some research and found some examples using WM_INPUT. Now before i waste to much time, am I on the right track? |
It does look that way.
There is this site where they complain about the removal of multiple mice support from DirectX and how they now have to use Raw Input instead.
Multiple Mice in Windows XP using Raw Input
http://www.jstookey.com/arcade/rawmouse/
(in case you haven't already seen this site, it included sample code.)
but this was before Windows 7 was released, which might be able to handle multiple mice via WM_TOUCH and WM_GESTURE. Searching for mutiple mice and WM_TOUCH I found references to people wanting to use a pair of mice to test code for touchscreens on non-touch capable PCs.
And you've also got to contend with the fact that Windows is only geared up to support a single mouse pointer and therefore (usually) merges the input from multiple mice into a single stream of events (WM_LBUTTONDOWN, etc). This means that multiple mice will probably confuse the operation of the system and normal (non-mutliple mice aware) apps. But it does appear that their are third-party drivers available which do support multiple mice, e.g.
MultiMouse 1.0.39
http://www.windows7download.com/win7-multimouse/ztjjgcdq.html
TeamPlayer
http://lifehacker.com/5080196/teamplayer-enables-multiple-input-devices
and this old open source project:
CPNMouse
http://cpnmouse.sourceforge.net/
(link now dead)
http://web.archive.org/web/20120908060728/http://cpnmouse.sourceforge.net/
(archived version)
http://mirror.transact.net.au/pub/sourceforge/c/project/cp/cpnmouse/
which even has its a YouTube.co video:
Using two mouse devices in windows - Very cool
http://www.youtube.com/watch?v=fDcxEILo5gQ
Are there some good examples you know of? |
Well, there doesn't seem to be a lot about. But the open source project's code ight be worth a look at for inspiration. And there's also the Raw Input code to look at.
It seems like there aren't many people in my situation. |
I guess this need has been limited to games so far, though a computer connected to two monitors might be a cheaper way to allow two kids to surf the web at the same time.
Andy