WM_NOTIFICATION_RELEASED is fired when button state is just pressed.

  • Hello everyone
    I have created a simple GUI by means of GUIBUILDER app. It consists a window and one button.
    A matrix keyboard is used and the keys data are passing to Emwin by executing WM_StoreKeyMsg(KeyValue,1) and WM_StoreKeyMsg(KeyValue,0) in interrupt routine, when the keys are pressing and releasing.
    The problem is that both WM_NOTIFICATION_CLICKED and WM_NOTIFICATION_RELEASED callback routines are fired when just pressing and holding the button (executing WM_StoreKeyMsg(KeyValue,1)).
    Where is the problem?

    Best regards
    Haia_Boosa

  • Hi,

    can you provide me with your emWin version number and some code to reproduce the behavior?

    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi Florian
    Thanks for reply.
    The problem is solved. According to Emwin manual, button reaction to Enter key is equal to pressing button and releasing it immediately. Therefore both WM_NOTIFICATION_CLICKED and WM_NOTIFICATION_RELEASED callback routines must be fired.

    Best regards,
    Haia_Boosa

Participate now!

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