gpt4 book ai didi

windows - 如何确定鼠标在两次单击之间允许的移动量以触发 WM_LBUTTONDBLCLK 消息?

转载 作者:可可西里 更新时间:2023-11-01 14:43:44 29 4
gpt4 key购买 nike

如何确定鼠标在两次单击之间允许的移动量以触发 WM_LBUTTONDBLCLK 消息?

MSDN Receiving Double-Click Messages

The OS generates a double-click message when the user clicks a mouse button twice in quick succession. When the user clicks a button, the OS establishes a rectangle centered on the hot spot of the cursor. The OS also marks the time at which the click occurred. When the user clicks the same button a second time, the OS determines whether the hot spot is still within the rectangle and calculates the time elapsed since the first click. If the hot spot is still within the rectangle and the elapsed time does not exceed the time-out value for a double-click, the OS generates a double-click message. An application can retrieve the time-out value for a double-click by using the GetDoubleClickTime function.

我能够确定最大允许时间间隔 GetDoubleClickTime但想知道允许的最大鼠标时刻。

最佳答案

来自 GetSystemMetrics 的文档:

The second click must occur within the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click.

int x_limit = GetSystemMetrics(SM_CXDOUBLECLK);
int y_limit = GetSystemMetrics(SM_CYDOUBLECLK);

关于windows - 如何确定鼠标在两次单击之间允许的移动量以触发 WM_LBUTTONDBLCLK 消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30496521/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com