Wednesday, May 23rd 2018, 10:40am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Oct 5th 2017

Posts: 30


Tuesday, October 10th 2017, 1:27pm

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?

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 587


Tuesday, October 10th 2017, 2:50pm


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.

SEGGER - Schoenen has attached the following file:



Date of registration: Oct 5th 2017

Posts: 30


Wednesday, October 11th 2017, 3:47pm

Thanks very much for great help! Regards