Two Childs over each others, conflict with "WM_TOUCH_CHILD" and pMsg->hWinSrc

  • hi,

    I have two child widgets over each others, bottom is a graph widget and the top is a button on a touch screen, when I touch the graph I get at the parent call back, at the message ID "WM_TOUCH_CHILD" a pMsg->hWinSrc of the graph handler, which is OK and no problem in that, but when I press the button wich is over the graph , I get at the message ID "WM_TOUCH_CHILD" two times, 1st with pMsg->hWinSrc of the graph handler, and 2nd with the button handler, which cause many problems at my code, so I need that when I press the button, just get one time at the message ID "WM_TOUCH_CHILD" , with the with the button handler only, how?


    Thanks

  • Hi,

    The behavior of emWin in that case could not be changed. If a window is touched, all ancestors receive that message. A solution could be overwriting the callback function of the GRAPH widget. It receives that message at first before it is also send to the parent of the GRAPH.

    I hope that helps.

    Regards, Jörg

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!