我们将 CPNMouse 用于在 Windows XP 上运行的应用程序。一个鼠标设备与普通事件队列分离,因此我们可以获取它的位置和事件并自己绘制光标。
不幸的是,CPNMouse 无法在 Windows Vista/7 上运行(请参阅 此处)。是否有任何库/SDK 在 Windows 7 上提供相同的功能?
只是为了澄清 - 我们希望存在“正常”光标并绘制另一个光标,该光标应映射到不同的鼠标设备。
更新:
CPNMouse 不再受支持,并且其之前的“开源”已从 SourceForge 中撤回。 CPN 工具官方网站上仅存在此旧版文档页面。
看起来只有商业产品可用...
如果有人有 SourceForce 原始源的副本,请在此处发布链接...假设原始许可证是标准 SourceForge(开放以共享/扩展) )变体应该可以让某人将其分叉到一个新项目以继续开发(免费工具)。
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).
发布评论
评论(3)
看一下 MultiPoint SDK,它允许同一显示屏上最多可显示 25 个光标,还支持 Windows 7。
Take a look at the MultiPoint SDK, which allows for up to 25 cursors on the same display, which also supports Windows 7.
您应该使用 Windows ddk 中的 dsf 创建模拟鼠标设备,然后任何程序都可以接受来自该特定模拟鼠标设备的输入并自行绘制指针。因此,您创建的任何程序都会有多个鼠标设备。遗憾的是,Windows 7 操作系统中不可能有多个指针,尽管他们明确不支持它。因此,您必须自己将指针绘制到屏幕上。
恐怕问题是你需要自己为鼠标绘制一个指针
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
您需要 Windows Platform SDK 附带的“原始输入”API: MSDN:关于原始输入
You want the "Raw Input" API which comes with the Windows Platform SDK: MSDN: About Raw Input