The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Darrel on July 19, 2005, 04:49:20 AM

Title: Mouse click speed
Post by: Darrel on July 19, 2005, 04:49:20 AM
Hi all,

How do you determine what the speed setting is for a mouse click?

I am using WM_LBUTTONDOWN and WM_LBUTTONUP and I would like to know If the WM_LBUTTONUP message constitues a click.

Thanks for your time and consideration,

Darrel
Title: Re: Mouse click speed
Post by: gavin on July 19, 2005, 11:50:05 AM
Hi Darrel.

I did something with the mouse for my first time a few days ago i'm new so if i'm wrong sorry.
Quote
The GetDoubleClickTime function retrieves the current double-click time for the mouse. A double-click is a series of two clicks of the mouse button, the second occurring within a specified time after the first. The double-click time is the maximum number of milliseconds that may occur between the first and second click of a double-click.

Syntax

UINT GetDoubleClickTime(VOID);

Return Value

    The return value specifies the current double-click time, in milliseconds.

I got this from www. msdn.com

So maybe something like this.



invoke SendMessage,hWnd,GetDoubleClickTime,0,0

I'm sure the value gets returned in eax.


I hope this is ok.
Title: Re: Mouse click speed
Post by: Darrel on July 19, 2005, 05:50:37 PM
Hi gavin,

Thanks for the reply. This answers my question. Never noticed this function in the API reference before, but it is there.

The correct implementation of the function is:

invoke GetDoubleClickTime

And yes eax contains the result.

Thanks again for your help gavin,

Darrel
Title: Re: Mouse click speed
Post by: PBrennick on July 19, 2005, 10:33:34 PM
Darrel,
Also, remember, if you don't like the value that is returned you can always use the SetDoubleClickTime function.  It sets the double-click time for the mouse.

Paul