问题描述
我正在处理鼠标事件,特别是OnMouseWheel
.许多代码示例将视图更改(或在3D应用程序中缩放fi)的距离称为Distance = Sign(WheelDelta)*Constant
或Distance = WheelDelta / WHEEL_DELTA
或类似的东西-假设WheelDelta始终是120的倍数(WHEEL_DELTA常数= 120).
I'm working with mouse events, specifically OnMouseWheel
. Many code samples refer to distance the view changes (or zoom f.i. in 3D application) as Distance = Sign(WheelDelta)*Constant
or Distance = WheelDelta / WHEEL_DELTA
or something of that kind - assuming that WheelDelta is always a multiple of 120 (WHEEL_DELTA constant = 120).
我已经发现,在触摸界面/平板电脑中,输入内容可能取决于滚动长度.
I already found that in touch interfaces / tablets input may depend on scrolling length.
我想知道为什么Microsoft将默认WheelDelta设置为120,为什么不将默认值设置为100或10或其他?在其他情况下,车轮变化量可能不同于120?
I was wondering why Microsoft has set default WheelDelta to 120, why not 100 or 10 or anything else? In what other cases wheel delta may be something different from 120?
推荐答案
WHEEL_DELTA不再固定为120.据我了解,选择该常量是为了将来可以使用更精细的分辨率,显然现在是.
WHEEL_DELTA is not fixed anymore to 120. As I understand it this constant was chosen to allow for finer resolutions in the future, which obviously is NOW.
请参见 MSDN
这篇关于为什么WheelDelta = 120?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!