How to calculate the time between LBUTTONDOWN and LBUTTONUP?
-
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ :cool:
-
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ :cool:
Here is a generic example on how to get elapsed time: CTime startTime; CTime endTime; CTimeSpan elapsedTime; On LBUTTONDOWN: startTime = CTime::GetCurrentTime(); On LBUTTONUP: endTime = CTime::GetCurrentTime(); elapsedTime = endTime - startTime; int timeout = elapsedTime.GetSeconds();
-
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ :cool:
wb_program wrote:
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ Cool
Also probably you can use GetCurrentMessage which contains a DWORD value which gives the time the message was posted. Note that you should only call this from event handlers. So call this from mouse up and mouse down.
Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com
-
I can't find any function for calculate the time between LBUTTONDOWN and LBUTTONUP,help me ~ :cool: