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. Parent window not on the top

Parent window not on the top

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 2 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.
  • V Offline
    V Offline
    Vancouver
    wrote on last edited by
    #1

    I have a dialog, which starts modeless subdialogs. They run nicely, but they always stay on top of the parent, even when the parent has the focus (I can type in data in a control of the parent window, if I move the child enough to the side). I trapped WM_ACTIVATE and issued SetWindowsPost(&wndTop...). This gets the control and works almost well (it moves the window If I want to), but it still remains under the children. What else do I have to do in order to win over the children?

    P 1 Reply Last reply
    0
    • V Vancouver

      I have a dialog, which starts modeless subdialogs. They run nicely, but they always stay on top of the parent, even when the parent has the focus (I can type in data in a control of the parent window, if I move the child enough to the side). I trapped WM_ACTIVATE and issued SetWindowsPost(&wndTop...). This gets the control and works almost well (it moves the window If I want to), but it still remains under the children. What else do I have to do in order to win over the children?

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      Make the subdialogs parent while creating them as the desktop window by calling GetDesktopWindow() i guess that should fix the problem.


      -prakash

      V 1 Reply Last reply
      0
      • P Prakash Nadar

        Make the subdialogs parent while creating them as the desktop window by calling GetDesktopWindow() i guess that should fix the problem.


        -prakash

        V Offline
        V Offline
        Vancouver
        wrote on last edited by
        #3

        That works well (although I wanted to avoid seeing the subdialogs on the task bar, but I can solve that otherwise). Thanks you. I wanted to rate your response, and accidentally clicked on "1". Sorry for that.

        P 1 Reply Last reply
        0
        • V Vancouver

          That works well (although I wanted to avoid seeing the subdialogs on the task bar, but I can solve that otherwise). Thanks you. I wanted to rate your response, and accidentally clicked on "1". Sorry for that.

          P Offline
          P Offline
          Prakash Nadar
          wrote on last edited by
          #4

          "I wanted to rate your response, and accidentally clicked on "1". Sorry for that." nevermind.


          -prakash

          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