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. Z-order of children

Z-order of children

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 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.
  • S Offline
    S Offline
    Sam Hobbs
    wrote on last edited by
    #1

    Anyone know how to reset the z-order of a window's children to be a specified z-order? Actually, I only need to be able to specify which child to be on top. I am hoping to control which child window gets the mouse click this way. So far setting focus does not work to determine who gtets the mouse click. SetActiveWindow does not affect the z-order, and I think that there is nothing to counter-act it but I will attempt to ensure that that is not a problem.

    L 1 Reply Last reply
    0
    • S Sam Hobbs

      Anyone know how to reset the z-order of a window's children to be a specified z-order? Actually, I only need to be able to specify which child to be on top. I am hoping to control which child window gets the mouse click this way. So far setting focus does not work to determine who gtets the mouse click. SetActiveWindow does not affect the z-order, and I think that there is nothing to counter-act it but I will attempt to ensure that that is not a problem.

      L Offline
      L Offline
      Lea Johnson
      wrote on last edited by
      #2

      To set the Z-Order: SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)

      S 1 Reply Last reply
      0
      • L Lea Johnson

        To set the Z-Order: SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)

        S Offline
        S Offline
        Sam Hobbs
        wrote on last edited by
        #3

        Thank you. I think it is working. Since I am using MFC, I converted your sample to: m_pEditWindow->SetWindowPos(&wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); There are still some problems with my program but it is likely that they are separate problems. I think that the z-order part is probably solved.

        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