Window click event

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

  • Window click event

    I would like to ask if is possible to catch click event on the empty space of window. I created simple screen using GUICreator and events are working properly on its children but I need to handle clicks on the empty space too. Is it possible with the emwin? Can anyone suggest any approach?

  • Hello,

    You may catch WM_TOUCH message in your Message callback fuction( cbOnTouch() ).

    void _cbOnTouch(WM_MESSAGE * pMsg) {

    /* old handle */
    FRAMEWIN_Callback(pMsg) ; /* if You use WINDOW as main window use WINDOW_Callback(pMsg) */

    switch (pMsg->MsgId) {
    case WM_TOUCH:
    /* Do your own handle */

    hWin = GUI_CreateDialogBox()

    WM_SetCallback(hWin, _cbOnTouch);