鼠标光标速度 UWP C++/CLI
我正在尝试使用 C++/CLI 在 Windows UWP 应用程序中获取鼠标光标速度。在传统的 Win32 应用程序中,我会使用 SystemParametersInfo 函数,例如:
SystemParametersInfo(
SPI_SETMOUSESPEED,
0,
uint.Parse(args[0]),
0);
但是,我在 UWP 应用程序中没有此功能。我四处寻找却没有任何运气。
I am trying to get the mouse cursor speed in a windows UWP app using C++/CLI. In a traditional Win32 App I would use the SystemParametersInfo function, something like:
SystemParametersInfo(
SPI_SETMOUSESPEED,
0,
uint.Parse(args[0]),
0);
However, I do not have this available in an UWP app. I looked everywhere without any luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在花了很多时间调查这个问题并且没有收到任何答案之后,我想我会结束这个问题,结论是这不能在使用 C++/CLI 的 UWP 环境中完成。这显然是 UWP 应用程序的限制。
After having spend a lot of time investigating this, and not having received any answer, I think I will close of this issue, with the conclusion that this cannot be done in an UWP environment using C++/CLI. It is apparently a restriction of an UWP App.
问题是您的 uiAction 不正确。
SPI_SETMOUSESPEED
用于设置鼠标速度。请使用SPI_GETMOUSESPEED
替换。The problem is your
uiAction
is not correct.SPI_SETMOUSESPEED
is used to set mouse speed. please useSPI_GETMOUSESPEED
to replace.