On Makemodal the message the GUI thread gets blocked

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

  • On Makemodal the message the GUI thread gets blocked

    Hi,
    I have a UI thread it wont receive any events from the other thread.
    If i display the alertmesage like MESSAGEBOX_Create("Message","Hi",GUI_MESSAGEBOX_CF_MODAL).

    UI thread like;
    GUItask()
    {
    hwin=GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN,10,5);

    MESSAGEBOX_Create("Message","Hi",GUI_MESSAGEBOX_CF_MODAL).

    while(1)
    {
    if(event)
    {//Do something
    }

    GUI_Delay(100)
    }

    }
  • facing problem when i use makemodal function

    Hi,
    I have seen that it wont receive any event from the other thread.
    For example, am using WM_MakeModal() fun


    void guiSetDate(WM_HWIN hWin1) {
    WM_HWIN hWin;
    buff = Startbuff; /* used this to show the content in to edit field or text labels */

    hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, hWin1, 0, 0);
    WM_SetUserData(hWin, &dateFilter, sizeof(dateFilter));
    WM_MakeModal(hWin);
    GUI_ExecCreatedDialog(hWin);
    }

    GUItask()
    {
    hwin=GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN,10,5);

    guiSetDate();

    while(1)
    {
    if(event)
    {//Do something
    }

    GUI_Delay(100)
    }

    }


    I used makemodal function because the user should not touch other widget if any popup is present .

    I have main screen it has many widgets , when i click the setdate edit field it pops up a dialog box .
    At the same time i can not touch any thing except the setdate dialog box. so,because that i used makemodal.
    And i am facing the problem when i get the event at that my GUI thread it is not receiving till i closet the pop up.

    Please can you tell us any solution regarding this.
    Am also attaching the screenshot.

    Regards,
    Venkat
    Images
    • makemodal.PNG

      49.61 kB, 804×507, viewed 713 times
  • Hello Venkat,

    The function WM_MakeModal() avoids other windows than the modal one to receive pointer input events. Are there any other events besides pointer input events you would expect to be handled? If yes, could you please explain to me which window should receive it? Is it ensured that the message is successfully sent?

    Best regards,
    Adrian