鼠标光标速度 UWP C++/CLI

发布于 2025-01-13 15:39:55 字数 262 浏览 3 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

荒路情人 2025-01-20 15:39:55

在花了很多时间调查这个问题并且没有收到任何答案之后,我想我会结束这个问题,结论是这不能在使用 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.

也只是曾经 2025-01-20 15:39:55

我正在尝试使用 C++/CLI 在 Windows UWP 应用程序中获取鼠标光标速度。

问题是您的 uiAction 不正确。 SPI_SETMOUSESPEED 用于设置鼠标速度。请使用SPI_GETMOUSESPEED替换。

检索当前鼠标速度。鼠标速度根据鼠标移动的距离决定指针移动的距离。 pvParam 参数必须指向一个整数,该整数接收范围在 1(最慢)和 20(最快)之间的值。默认值为 10。该值可以由最终用户使用鼠标控制面板应用程序或由应用程序使用 SPI_SETMOUSESPEED 设置。


SPI_GETMOUSESPEED
0x0070

SPI_SETMOUSESPEED
0x0071

I am trying to get the mouse cursor speed in a windows UWP app using C++/CLI.

The problem is your uiAction is not correct. SPI_SETMOUSESPEED is used to set mouse speed. please use SPI_GETMOUSESPEED to replace.

Retrieves the current mouse speed. The mouse speed determines how far the pointer will move based on the distance the mouse moves. The pvParam parameter must point to an integer that receives a value which ranges between 1 (slowest) and 20 (fastest). A value of 10 is the default. The value can be set by an end-user using the mouse control panel application or by an application using SPI_SETMOUSESPEED.

SPI_GETMOUSESPEED
0x0070

SPI_SETMOUSESPEED
0x0071
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文