简体   繁体   English

如何获得鼠标滚轮的垂直滚动速率

[英]How can I get the mouse wheel vertical scroll rate

I'm currently developping a custom control, and, to implement vertical scrolling, I want to be able to fetch the configured vertical scroll rate (described here ). 我目前正在开发一个自定义控件,并且要实现垂直滚动,我希望能够获取已配置的垂直滚动率( 在此进行介绍)。 I would use this setting to move the control by [X] number of lines. 我将使用此设置将控件移动[X]行数。

You can get it from SystemParametersInfo function with SPI_GETWHEELSCROLLLINES . 您可以使用SPI_GETWHEELSCROLLLINESSystemParametersInfo函数获取它。

Retrieves the number of lines to scroll when the vertical mouse wheel is moved. 检索移动垂直鼠标滚轮时要滚动的行数。 The pvParam parameter must point to a UINT variable that receives the number of lines. pvParam参数必须指向一个接收行数的UINT变量。 The default value is 3. 预设值为3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM