如何确定鼠标在两次单击之间允许的移动量以触发 WM_LBUTTONDBLCLK 消息?
How can I determine the amount of movement a mouse is allowed between two click for the WM_LBUTTONDBLCLK message to be fired?
如何确定鼠标在两次单击之间允许的移动量以触发 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);
如何确定鼠标在两次单击之间允许的移动量以触发 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);