Button press not returning released notification

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

    • Button press not returning released notification

      Hi,

      I have been working with emWin for quite sometime now. I am currently using buttons for some functionalities in my project. I have a couple of things I would like to get technical answers for.

      1. I have found that sometimes even after the button is released, it wouldn't send NOTIFICATION_RELEASED. This happens only when the buttons are pressed at the edges. Is there a way to solve this problem?
      2. I am displaying images and text boxes. Since the image isn't performing any functions, when pressed on it, creates a touch beep just like functioning part of the scree. Is there a way to disable this so I don't hear a beep when a non-functional object is pressed?

      I look forward to hearing from you. Appreciate all the help.

      Thanks and regards,
      BMD
    • Hi BMD,

      Regarding your first question: I am guessing that a press at the edge of a button results in the touch input being moved out of the BUTTON window.

      When a button is pressed and the touch input is moved out of the window area, the parent window will not receive a WM_NOTIFICATION_CLICKED message (not even when the touch input is being moved back into the window area and released).

      When the touch input is being moved out of a window, the parent window receives a WM_NOTIFICATION_MOVED_OUT.

      Regarding your second issue: You can overwrite the IMAGE callback and react on WM_TOUCH. This will result in all touch input the IMAGE widget receives being handled by your callback.

      C Source Code

      1. static void _cbImage(WM_MESSAGE * pMsg) {
      2. switch(pMsg->MsgId) {
      3. case WM_TOUCH:
      4. //
      5. // Do not beep...
      6. //
      7. break;
      8. default:
      9. IMAGE_Callback(pMsg);
      10. }
      11. }
      Display All

      Best regards,
      Florian
      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: segger.com/ticket/

      Or you can contact us via e-mail.
    • Florian,

      Thank you so much for your response.

      1. So you are suggesting that I put my code which I am executing during NOTIFICATION_RELEASED also under WM_NOTIFICATION_MOVED_OUT???
      2. Thank you for the suggestion. Will try that out.

      Best regards,
      BMD