none
Roll in Multi Touch, how can this happen? RRS feed

  • Question

  • Hi guys, 

    I got a question.
    I used HP touch smart(Win7) to test my app, and now I wanna distingish the mouse move event and mouse roll event.
    Your know, when I pressed the screen follow the uprightness direction, the response event is similar the mouse roll event. 
    On the other hand, when I pressed the screen follow the across direction and other none-regular direction, the response event  is similar the mouse move event.
    So how can I distingish those two events?
    PS: I can use the WM_TOUCHMOVE to catch the touch move event, while I can't find the corresponding touch roll event. That's my question. 
     
    my code is like this : 

    if ((pInputs[i].dwFlags & TOUCHEVENTF_DOWN) != 0)
    {
    ...
    }
    else if ((pInputs[i].dwFlags & TOUCHEVENTF_UP) != 0)
    {
    ...
    }
    else if ((pInputs[i].dwFlags & TOUCHEVENTF_MOVE) != 0)
    {
    ...
    }

    Thanks
    HZMT
    Thursday, August 20, 2009 7:47 AM

Answers

  • Hmm... Sounds like you need to use gestures and interpret the panning gestures.   You can find some more information on this here.
    • Marked as answer by HZMT Wednesday, August 26, 2009 5:14 AM
    Friday, August 21, 2009 5:09 PM
    Moderator

All replies

  • > I can use the WM_TOUCHMOVE to catch the touch move event
    This is strange, are you on RC?  After the Beta release, the WM_TOUCHMOVE event was removed from the SDK and code should use the TOUCHEVENTF_* flags to discern the event type (the code you're showing looks correct, btw, code with WM_TOUCHMOVE/DOWN/UP should not work).  This has been a point of some confusion, apologies if you have been affected by it.  It's just strange that you are seeing the MW_TOUCHMOVE message, your build of 7 may be generating these messages, the SDK you have may have some strange hacks / definitions in it, but I wouldn't expect to see the events you're seeing in the RC/RTM build / SDK.

    > mouse roll event
    I'm not aware of a "ROLL" event, however, it IS possible to distinguish between mouse input and touch input.  Please see Troubleshooting Windows Touch for more information on this.  The following code (from Troubleshooting) might be helpful for you:



    #define MOUSEEVENTF_FROMTOUCH 0xFF515700

    if ((GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) {
    // Click was generated by wisptis / Windows Touch
    }else{
    // Click was generated by the mouse.
    }

    Also, you might want to look into disabling flicks as described in Troubleshooting.

    One more thing you may want to look into is closing the TOUCH handle if you have handled the input.  This would prevent mouse events from being generated by WISPTIS when it interprets unclosed touch input.

    Finally, make sure you aren't seeing gesture events, perhaps touch input is not happening, and you are seeing gestures.  From what you are saying, it sounds like you are trying to use/interpret panning gestures.  This input type can be configured so that you specifically have certain types vertical / horizontal panning.

    Regards,
    Gus
    Thursday, August 20, 2009 10:37 PM
    Moderator
  • > I can use the WM_TOUCHMOVE to catch the touch move event
    Yeah, I make a misunderstanding. Acutlly, like what you said, I use WM_TOUCH, to catch the touch event,

    switch (message) 
    case WM_TOUCH:
    OnTouchMove(hWnd, wParam,lParam);
    ...
    }

    then in the OnTouchMove function I use GetTouchInputInfo() and the three judgement
    if ((pInputs[i].dwFlags & TOUCHEVENTF_DOWN) != 0)... to distingish the touch down, up or move.

    > mouse roll event 
    Actually, I want to ask touch roll event.
    when I touch and hold on vertical direction in a sample.txt(suppose), the charactor in sample.txt is rolling, this gesture like when you use the mouse to roll the sample.txt. 
      
    I am apologized if I caused any misunderstanding to you, Gus, sorry.

    And like I am requiring, when I touch and hold on vertical direction, it's different from horizontal direction, you know, the charactor won't roll if you did that on  horizontal direction or other slant direction. And what I known is WM_Touch and TOUCHEVENTF_MOVE was caused by this guesture.
    So my question is which event was caused by touch and hold on vertical direction.

    Thanks for your consideration.

    Regards, 
    HZMT

    Friday, August 21, 2009 3:02 AM
  • is WM_VSCROLL?
    Friday, August 21, 2009 3:05 AM
  • Hmm... Sounds like you need to use gestures and interpret the panning gestures.   You can find some more information on this here.
    • Marked as answer by HZMT Wednesday, August 26, 2009 5:14 AM
    Friday, August 21, 2009 5:09 PM
    Moderator