1. How to check if the window is modal? 2. How to get a handle of parent dialog window by a handle of its child widget?​​

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

    • 1. How to check if the window is modal? 2. How to get a handle of parent dialog window by a handle of its child widget?​​

      Hello.

      1. How to check if the window is modal?
      2. How to get a handle of parent dialog window by a handle of its child widget?
      Best regards,
      Volodymyr.
    • Hello,

      1. Not sure if there is a special function in emWin, at least from documented, therefore, I’m afraid, again I’m going to tell about saving a window handle before making it modal and then checking a handle of necessary window if it matches to saved handle :) . Maybe Sven would clarify it.

      2. Maybe you are looking for WM_GetParent() function.

      Alex.

      The post was edited 1 time, last by LexaGb ().

    • SEGGER - Schoenen wrote:

      Hi all,

      Unfortunately, there is no API function yet to get the modal window (wondering why..). I will add such a function, but it might take while till it gets released.

      For now you should use LexasGBs solution.

      Regards,
      Sven


      I think that the WM_MakeModal function should also have a symmetric function like "WM_CancelModal". Because now there is no function to cancel the modality of the window.

      Also I would like to know if there is a simple and elegant way to make the Dialog-window modal in relation to another Dialog-window or to a group of Dialog-windows, but not to all windows that has been created.

      In other words, is there any way to forbid any reactions to the PID (mouse/touchpad) of one window while another window is open above it and has focus for PID-control?
      I mean to do it exactly like WM_MakeModal but only for certain specified window(s).
      Because WM_DisableWindow gives unneccessary visual effects.
      Best regards,
      Volodymyr.

      The post was edited 2 times, last by volodymyr ().