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-ordering, wndTopMost and modal dialogs

Z-ordering, wndTopMost and modal dialogs

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncomtutorial
2 Posts 2 Posters 1 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.
  • M Offline
    M Offline
    moredip
    wrote on last edited by
    #1

    Hi All, I was wondering if anyone had some advice regarding a z-ordering issue I'm having with my application. For some background, part of my app's functionality if video playback, and the app has a modeless 'VCR' dialog, that allows users to skip forward a frame at a time, play, pause, skip to the end, etc etc. I wanted to keep this dialog above the video windows, so I followed Nish's advice in http://www.codeproject.com/dialog/dlgboxtricks.asp (Making your dialog stay on top), and added the appropriate SetWindowPos( &wndTopMost, .....) call in the VCR dialog's InitDialog(). This worked great, but I've now noticed a problem. When the app shows modal dialogs (a preferences dialog, for example), they are shown underneath the VCR dialog. However, because the preferences dialog is modal, I can't move the VCR dialog out of the way because it won't get focus. So my question is, what's the best way to ensure that modal dialogs are shown ABOVE the modeless VCR dialog, while video windows, etc are shown below it. Do I need to add SetWindowPos() calls to OnInitDialog() for every modal dialog in the application, or is there a way of specifying that the VCR control is shown ABOVE regular windows but below modal dialogs? Any advice would be greatly appreciated. Cheers, Pete

    M 1 Reply Last reply
    0
    • M moredip

      Hi All, I was wondering if anyone had some advice regarding a z-ordering issue I'm having with my application. For some background, part of my app's functionality if video playback, and the app has a modeless 'VCR' dialog, that allows users to skip forward a frame at a time, play, pause, skip to the end, etc etc. I wanted to keep this dialog above the video windows, so I followed Nish's advice in http://www.codeproject.com/dialog/dlgboxtricks.asp (Making your dialog stay on top), and added the appropriate SetWindowPos( &wndTopMost, .....) call in the VCR dialog's InitDialog(). This worked great, but I've now noticed a problem. When the app shows modal dialogs (a preferences dialog, for example), they are shown underneath the VCR dialog. However, because the preferences dialog is modal, I can't move the VCR dialog out of the way because it won't get focus. So my question is, what's the best way to ensure that modal dialogs are shown ABOVE the modeless VCR dialog, while video windows, etc are shown below it. Do I need to add SetWindowPos() calls to OnInitDialog() for every modal dialog in the application, or is there a way of specifying that the VCR control is shown ABOVE regular windows but below modal dialogs? Any advice would be greatly appreciated. Cheers, Pete

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Windows is doing just what you told it to do, showing the VCR dialog above all other windows. You'll need to either make the modal dlg topmost as well, or temporarily make the VCR dialog non-topmost while the modal dialog is up. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb

      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