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. Preventing a child window to change its z-order?

Preventing a child window to change its z-order?

Scheduled Pinned Locked Moved C / C++ / MFC
helpwpfhardwarealgorithmstesting
2 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.
  • D Offline
    D Offline
    Don Rolando
    wrote on last edited by
    #1

    Hallo, is there any possibility to prevent an embedded child window to change its z-order? My current problem is, I have an control embedded that brings itself into the front sporadically. Since it's embedded in one of my dialogs, the corresponding dialog is popping into the foreground, too. :( Within the application this causes an affected dialog to pop in front of another dialog the user could be working in at the same moment. For testing purposes I made a ::SetParent(controlHwnd, NULL). Once being a child of the desktop, it pops in front of any application now, not only on top of the application it was embedded in. Anyhow, since I have no chance to modify the control itself (no sources!), I am searching for a way to prevent the control of changing its z-order. Is there any chance to "pin" it? I have tried nearly all windows styles, but since the control seems to push itself into the front, I cannot do a lot against it this way. Perhaps subclassing the control's window and filtering some specific events? Any help appreciated! Thanks a lot in advance, Roland

    B 1 Reply Last reply
    0
    • D Don Rolando

      Hallo, is there any possibility to prevent an embedded child window to change its z-order? My current problem is, I have an control embedded that brings itself into the front sporadically. Since it's embedded in one of my dialogs, the corresponding dialog is popping into the foreground, too. :( Within the application this causes an affected dialog to pop in front of another dialog the user could be working in at the same moment. For testing purposes I made a ::SetParent(controlHwnd, NULL). Once being a child of the desktop, it pops in front of any application now, not only on top of the application it was embedded in. Anyhow, since I have no chance to modify the control itself (no sources!), I am searching for a way to prevent the control of changing its z-order. Is there any chance to "pin" it? I have tried nearly all windows styles, but since the control seems to push itself into the front, I cannot do a lot against it this way. Perhaps subclassing the control's window and filtering some specific events? Any help appreciated! Thanks a lot in advance, Roland

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

      This Article by Raymond Chen[^], might suggest a solution. Then again it might make things worse by confusing the issue. What you want to determine is why your control "brings itself into the front sporadically". It's being triggered by something, obviously. Here's another Interesting bit of z-order lore[^].

      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