Could I bring a parent window on the top of its child window?
-
Hi, I am a new comer of MFC, and here is my question: I created a child window on the top of its parent window so its parent window is covered(both are derived from Cwnd). I wish I could bring the parent window to be visible any time by a button click even when the child window is still active. I tried to call: parentwindow->BringWindowToTop(); but it does not work. I am wondering maybe I just can't do so when its child window is still shown or not hiden. Anybody has any idea about this? Thanks in advance! carl
-
Hi, I am a new comer of MFC, and here is my question: I created a child window on the top of its parent window so its parent window is covered(both are derived from Cwnd). I wish I could bring the parent window to be visible any time by a button click even when the child window is still active. I tried to call: parentwindow->BringWindowToTop(); but it does not work. I am wondering maybe I just can't do so when its child window is still shown or not hiden. Anybody has any idea about this? Thanks in advance! carl
-
1.The child window can't use DoModal(),you can use Create(). 2.You can show child window hide,then the parent show all.
Thanks very much for the reply! But I am just wondering should i have to hide the child window first in order to show parent window? I have tried it and it seem it is the case! I wish I could make the parent window visible even without having to hide the child window because you may not know which child window is showing.