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. Modeless dialog always remanins in foreground?

Modeless dialog always remanins in foreground?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
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.
  • P Offline
    P Offline
    pc_dev
    wrote on last edited by
    #1

    I am working on SDI application that creates a modeless dialog, the problem is that modeless dialog always remains in foreground, even if i click on the title bar of the sdi frame. I have set style of sdi frame window to WS_EX_TOPMOST but it donot works for modeless dialog. How can i bring modeless dialog to the back of Z order, SetWindowPosition also do not work. It looks that windows always puts modeless dialog in forground of main window. how this default behaviour can be changed.

    N 1 Reply Last reply
    0
    • P pc_dev

      I am working on SDI application that creates a modeless dialog, the problem is that modeless dialog always remains in foreground, even if i click on the title bar of the sdi frame. I have set style of sdi frame window to WS_EX_TOPMOST but it donot works for modeless dialog. How can i bring modeless dialog to the back of Z order, SetWindowPosition also do not work. It looks that windows always puts modeless dialog in forground of main window. how this default behaviour can be changed.

      N Offline
      N Offline
      Nyarlatotep
      wrote on last edited by
      #2

      Create the dialog as child of the desktop (GetDesktopWindow()) instead of the main application window ...

      P 1 Reply Last reply
      0
      • N Nyarlatotep

        Create the dialog as child of the desktop (GetDesktopWindow()) instead of the main application window ...

        P Offline
        P Offline
        pc_dev
        wrote on last edited by
        #3

        Thanks for the idea, instead of making it child of desktop i have made it child of another class, because i dont know effects of making it child of desktop it may mind :) any how the problem is 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