Tuesday, November 21st 2017, 7:17am UTC+1

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.

mjanas10

Beginner

Date of registration: Oct 5th 2017

Posts: 19

1

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: 410

2

Tuesday, October 10th 2017, 2:50pm

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
SEGGER - Schoenen has attached the following file:

mjanas10

Beginner

Date of registration: Oct 5th 2017

Posts: 19

3

Wednesday, October 11th 2017, 3:47pm

Thanks very much for great help! Regards