Multiple mouse cursors on Windows 7
Asked Answered
L

3

7

We are using CPNMouse for an application running on Windows XP. One mouse device is detached from the normal event queue, so we can get it's position and events and draw the cursor ourselves.

Unfortunately, CPNMouse does not work on Windows Vista/7 (see here). Is there any library/SDK that provides the same capabilities on Windows 7?

Just to clarify - we want the "normal" cursor to be present and to draw another cursor, that should be mapped to a different mouse device.


Update: CPNMouse is no longer supported and its previously "open source" withdrawn from SourceForge. Only this legacy documentation page exists on the official CPN Tools site.

Looks like only commercial products are available...

If anyone has a copy of the original source from SourceForce please post a link here... Assuming the original license was a standard SourceForge (open to share/expand) variant it should be okay for someone to fork it to a new project for continued development (of a free tool).

Lightish answered 19/4, 2010 at 8:5 Comment(0)
C
2

You should use the dsf from the windows ddk to create an emulated mouse device then any program can accept input from that specific emulated mouse device and draw the pointer it self. So any program you create will have multiple mouse devices in it. Its sad to say that its not possible to have multiple pointers in windows 7 OS though they specifically dont support it. So you would have to draw the poiner onto the screen yourself. Im afraid the point is you need to draw a pointer yourself for the mouse

Chichi answered 20/10, 2011 at 13:28 Comment(4)
This is exactly what CPNMouse is doingLightish
dsf is used to test industrial line devices from windows xp to windows 7 including server editions inbetween also.Chichi
I have a better version at my kinectmultipoint.codeplex.com page. It is being currently worked on. Its in dotnet but Iam almost done and you could just take the default c/c++ code in wdk and compile and get the softehci and other dll files I use in my vbscript file. Iam looking for windows 8 alterative but their seems to be none so far. Try looking at my code although you can revise it to store mouse data a different way from c++. You could use multipoint and have it draw the mouse devices for you or use some dsf code to detect the number of mouse devices and draw to the screen.Chichi
CPNmouse might have got updated since my last post. Any code in c++ that handles multiple mouse devices will need to have code to manually draw the specific mouse pointer and update its position. You could do it with another api like CPNmouse but on last attempt CPNMouse did not behave well like I wanted it to.Chichi
P
3

Take a look at the MultiPoint SDK, which allows for up to 25 cursors on the same display, which also supports Windows 7.

Personal answered 19/4, 2010 at 8:11 Comment(2)
I'm sorry, I forgot to mention that the application does not use the .NET framework. It uses native C++ and Qt 4.Lightish
Me and I bet quite a few others are looking for a way of using the second display whilst running a full screen app or game. Games are the best example, they usually take ownership of all active input. I'd like to use my spare monitor to operate the game integrated web site (many have that, e.g. BattleField 4) or just browse and control my own music playlists whilst playing. For this only an operating system solution (not API for one specific app to use) will do the trick.Pasia
P
2

You want the "Raw Input" API which comes with the Windows Platform SDK: MSDN: About Raw Input

Pasture answered 19/4, 2010 at 9:18 Comment(1)
I am aware of the RawInput API, it is available in Windows XP as well. The problem is I can't use it as I mentioned in my question: in a windowed application, it is not possible to draw the cursor for only one of the devices.Lightish
C
2

You should use the dsf from the windows ddk to create an emulated mouse device then any program can accept input from that specific emulated mouse device and draw the pointer it self. So any program you create will have multiple mouse devices in it. Its sad to say that its not possible to have multiple pointers in windows 7 OS though they specifically dont support it. So you would have to draw the poiner onto the screen yourself. Im afraid the point is you need to draw a pointer yourself for the mouse

Chichi answered 20/10, 2011 at 13:28 Comment(4)
This is exactly what CPNMouse is doingLightish
dsf is used to test industrial line devices from windows xp to windows 7 including server editions inbetween also.Chichi
I have a better version at my kinectmultipoint.codeplex.com page. It is being currently worked on. Its in dotnet but Iam almost done and you could just take the default c/c++ code in wdk and compile and get the softehci and other dll files I use in my vbscript file. Iam looking for windows 8 alterative but their seems to be none so far. Try looking at my code although you can revise it to store mouse data a different way from c++. You could use multipoint and have it draw the mouse devices for you or use some dsf code to detect the number of mouse devices and draw to the screen.Chichi
CPNmouse might have got updated since my last post. Any code in c++ that handles multiple mouse devices will need to have code to manually draw the specific mouse pointer and update its position. You could do it with another api like CPNmouse but on last attempt CPNMouse did not behave well like I wanted it to.Chichi

© 2022 - 2024 — McMap. All rights reserved.