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. Could I bring a parent window on the top of its child window?

Could I bring a parent window on the top of its child window?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
3 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.
  • C Offline
    C Offline
    carl wang
    wrote on last edited by
    #1

    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

    B 1 Reply Last reply
    0
    • C carl wang

      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

      B Offline
      B Offline
      bmzhao
      wrote on last edited by
      #2

      1.The child window can't use DoModal(),you can use Create(). 2.You can show child window hide,then the parent show all.

      A 1 Reply Last reply
      0
      • B bmzhao

        1.The child window can't use DoModal(),you can use Create(). 2.You can show child window hide,then the parent show all.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        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.

        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