Child keeps covering parent
-
Hi there all, Ik create a child dialog using CDialog->Create, followed by ShowWindow. Works just fine. I can now again activate the parent window, while the child is still alive. However: The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated (I know that this can be the hard truth in real life, but I would like my computer to do what I want)! How do I do such a thing? Thanks in advance, William
-
Hi there all, Ik create a child dialog using CDialog->Create, followed by ShowWindow. Works just fine. I can now again activate the parent window, while the child is still alive. However: The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated (I know that this can be the hard truth in real life, but I would like my computer to do what I want)! How do I do such a thing? Thanks in advance, William
Wim Engberts wrote:
The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated
While creating child dialog specify desktop window( Use
GetDesktopWindow
) as the parent instead of the "parent dialog". As you said this is the expected behavior.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
Wim Engberts wrote:
The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated
While creating child dialog specify desktop window( Use
GetDesktopWindow
) as the parent instead of the "parent dialog". As you said this is the expected behavior.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
Thanks a lot; this solved the problem. William
-
Wim Engberts wrote:
The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated
While creating child dialog specify desktop window( Use
GetDesktopWindow
) as the parent instead of the "parent dialog". As you said this is the expected behavior.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
Thanks a lot. This does indeed solve the problem. William
-
Wim Engberts wrote:
The child still covers the parent even if the parent is active and the child is not. There is no way that I get the parent to overlap the child when it is activated
While creating child dialog specify desktop window( Use
GetDesktopWindow
) as the parent instead of the "parent dialog". As you said this is the expected behavior.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
When advising people to use the desktop as a parent, it might be prudent to mention the dangers of doing so[^]. In general, you should not associate your child window with one that you do not own/control. Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
Thanks a lot. This does indeed solve the problem. William
FYI - you may want to note the following: http://blogs.msdn.com/oldnewthing/archive/2004/02/24/79212.aspx[^].
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
When advising people to use the desktop as a parent, it might be prudent to mention the dangers of doing so[^]. In general, you should not associate your child window with one that you do not own/control. Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesThanks for this info james.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com