Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Child keeps covering parent

Child keeps covering parent

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wim Engberts
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • W Wim Engberts

      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

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      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

      W J 3 Replies Last reply
      0
      • N Nibu babu thomas

        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

        W Offline
        W Offline
        Wim Engberts
        wrote on last edited by
        #3

        Thanks a lot; this solved the problem. William

        1 Reply Last reply
        0
        • N Nibu babu thomas

          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

          W Offline
          W Offline
          Wim Engberts
          wrote on last edited by
          #4

          Thanks a lot. This does indeed solve the problem. William

          J 1 Reply Last reply
          0
          • N Nibu babu thomas

            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

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #5

            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

            N 1 Reply Last reply
            0
            • W Wim Engberts

              Thanks a lot. This does indeed solve the problem. William

              J Offline
              J Offline
              James R Twine
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • J James R Twine

                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

                N Offline
                N Offline
                Nibu babu thomas
                wrote on last edited by
                #7

                Thanks 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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups