0

How can I handle left mouse double click events in Windows by suppressing the first click events.For ex: Left mouse single click highlights the image object and double click zooms the image, but for now I want on double click not to highlight the image object?

This happens probably the sequence of events triggered on left mouse double click are WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_LBUTTONUP. i.e it triggers the WM_LBUTTONDOWN, so how do I handle this?

4

1 回答 1

3

你不能压制这种行为。您可以做的是在第一次单击时启动一次性计时器,其中间隔设置为报告的毫秒数GetDoubleClickTime()。如果发生双击,请停止计时器并执行双击逻辑。如果计时器到时,请停止计时器并改为执行单击逻辑。

于 2013-03-18T17:19:31.863 回答