Hide Parent with Children - keep children hidden when showing parent again

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

  • Hide Parent with Children - keep children hidden when showing parent again

    Dear all
    I have an active parent window with children. I'd like to hide the parent including its children.
    It appears that I need to hide individual child windows one by one, otherwise if I show the parent the unhidden children will be painted. Is it possible to hide the all of the windows at once such that once I show the parent again the children would still be hidden?
  • Hi,

    If you call WM_HideWindow(hParent), where hParent is the handle of the parent window, any child windows will become hidden as well.

    If you want the child windows kept hidden you have to manualy mark them as hidden by WM_HideWindow().

    With the functions WM_GetFirstChild() and WM_GetNextSibling() it is quite easy to iterate over all child windows of another window.

    Attached is an example where all child windows of a parent stay hidden after the parent gets shown again.

    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.