I’m sending mouseclicks to an ActiveX control in C++ one after the other (I’m using AutoDesk Design Review (a CAD system) and sending the clicks to draw an arc).
The only problem I’m having is that if two of the clicks are near each other it registers as a double click.
Is there a value in Windows which determines if the clicks’ coordinates make it a double click?
e.g. If the coordinates are less than 10 pixels apart it’s a double click, otherwise it’s two single clicks.
I cannot intercept the click or cancel the click event in the ActiveX control so I need to stop it firing before.
Many thanks
Alex
The Windows API does provide a way to determine the double-click time and the double-click rectangle:
GetDoubleClickTime()to get the double-click time.GetSystemMetrics()with theSM_CXDOUBLECLKindex to get the rectangle width.GetSystemMetrics()with theSM_CYDOUBLECLKindex to get the rectangle height.According to the MSDN documentation for mouse input:
This should be sufficient information for detecting double-mouse clicks.