How to implement Long Touch event?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • How to implement Long Touch event?

    Hello,

    I have made long touch event on timer. It works like this:
    When you click a button, in WM_NOTIFICATION_CLICKED case I start new timer.
    Eatch time timer expires I send mesage to my window and restart timer.
    When I am counting these mesages and after some time I say that Long Touch event was made.
    It is working quite well.

    But still have some problems at this:

    When the Long Touch event ocurs, I creat a new window. My finger is still pressing the LCD. When new is created, I'm untuoching the LCD and if my finger is a little bit moveingit realeases a new button in new window. tihs is the first problem. The other problem is that when long touch creates new window WM_NOTIFICATION_RELEASED event also ocurs on first window. But I whant only long touch event at that time on that button, not realese.

    Have someone ideas how to make this event work fine?

    Also I was trying to start new timer in new window witch will not let to push eny button, but this solution is annoying then you try to push button to fast and screen ar not working.
    Other solution that I tried to wait for first realease in new window and say that it is init touch, but it's not good solution too, because sometimes when you release new window it dont see that first release, and thats why when you trying to push somefing it dont doo enything.








    Grateful for your understanding and support!
  • Problems solved with reading two PID states (GUI_PID_GetCurrentState) at different times and disabling buttons before creating new window. Hope this can help anyone.

    Now this event working just fine!

    Good look