Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualfanaticlatic

Posted 17 August 2012 - 09:05 AM

Hello all,

I am trying to implement support for multi-touch in a windows 7 environment.

I am using the following links:
http://msdn.microsof...d562197(v=vs.85).aspx
http://msdn.microsof...d317321(v=vs.85).aspx
http://msdn.microsof...d317334(v=vs.85).aspx

Through all those links I can't seem to find any information on how and when to use the time-stamp (dwTime) member of the TouchIput structure, and more importantly what to do when the time-stamp wraps around.

Currently I check the time-stamp of the event message and compare it too a stored value from the previous frame like so:

[source lang="cpp"]if( ( touchstore[ i ].dwID == message[ mindex ].dwID ) && ( message[ mindex ].dwTime > touchstore[ i ].dwTime ) ){ touchstore[ i ] = message; // do something when touch sequence matches and timestamp of message is newer than stored touch}[/source]

dwTime is a DWORD and represents a timestamp in milliseconds, How do I cater for dwTime wrapping around?


Thanks for any help and advice you can provide.

Mark.

#1fanaticlatic

Posted 17 August 2012 - 09:04 AM

Hello all,

I am trying to implement support for multi-touch in a windows 7 environment.

I am using the following links:
http://msdn.microsof...d562197(v=vs.85).aspx
http://msdn.microsof...d317321(v=vs.85).aspx
http://msdn.microsof...d317334(v=vs.85).aspx

Through all those links I can't seem to find any information on how and when to use the time-stamp (dwTime) member of the TouchIput structure, and more importantly what to do when the time-stamp wraps around.

Currently I check the time-stamp of the event message and compare it too a stored value from the previous frame like so:

[source lang="cpp"]if( ( touchstore[ i ].dwID == message[ mindex ].dwID ) && ( touchstore[ i ].dwTime > message[ mindex ].dwTime ) ){ touchstore[ i ] = message; // do something when touch sequence matches and timestamp of message is newer than stored touch}[/source]

dwTime is a DWORD and represents a timestamp in milliseconds, How do I cater for dwTime wrapping around?


Thanks for any help and advice you can provide.

Mark.

PARTNERS