Dynamically Adding and Removing the button/text/edit boxes

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

  • Dynamically Adding and Removing the button/text/edit boxes

    Hello,
    What is the best way to add/ remove few button/text/edit boxes dynamically on different part of the screen ?


    Is there a way to hide certain part of the screen? or having multiple screen is the only option?
  • Hi,

    You can use the function WM_HideWindow(), WM_ShowWindow() and WM_ SetWindowPos(). With these functions you can, for example, react on a button release and hide a window or show a hidden window, set its position etc.

    Please have a look into the sample code attached. There I create a two dialogs where one is hidden. On a click somewhere into the visible dialog the invisible dialog gets shown. On a click on the button the second dialog gets invisible again.
    Is there a way to hide certain part of the screen?
    To hide a certain part of the screen you can create a window (hHalfScreen) with half the screen size and create all required WIDGETS as child of this window.
    Then call WM_HideWindow(hHalfScreen) and the window with all its content (e.g. WIDGETS) gets invisible.

    Another Possibility is to use MULTILAYER, but this depends on the hardware you are using.

    Regards,
    Sven
    Files
    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.