Re: modeless dialog boxes and z order



This is contrary to how dialogs work. Modeless dialogs are normally on top of their
parent. You can make the desktop window their parent, and this leads to other serious
consequences,

It is Windows handling the issue. SetWindowPos can adjust the relative positions of the
dialogs with respect to each other's Z-order, but they will necessarily be on top of their
parent, because that's how dialogs are implemented. By the way, did you check the result
of SetWindowPos to see if it actually worked?
joe

On Wed, 22 Aug 2007 16:58:02 -0700, CharlieB <CharlieB@xxxxxxxxxxxxxxxxx> wrote:

My dialog based app creates several modeless dialogs. I want the window with
focus to always be on top. So I want the modeless dialogs on top when
activated. I want the main window on top when it is activated (click on it).
I know this is contrary to standard behavior. I also know I may end up
with hidden windows and have a plan. At this point however I cannot find a
way for a modeless dialog to be below the window that created it.

I have tried many different calls to SetWindowPos but somehow either MFC or
Windows overrides these.

Any help greatly appreciated.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Help in creating dialog based application
    ... But the way you would notify the parent dialog to do anything is PostMessage ... dialog as parent but how i will inform the parent window to distroy ... dialog which will create modeless dialogs so when i switch to some ...
    (microsoft.public.vc.mfc)
  • Re: Multiple modal windows with the same parent
    ... Though EndModalLoop is invoked and WM_NULL message is ... of my dialogs, it turned out that one of them just stopped closing (in ... in which case the second dialog's parent would be the first dialog ... But isn't it possible the first modal window creates another modal ...
    (microsoft.public.vc.mfc)
  • Re: Main dialog window always remains behind other dialogs: how can I change this?
    ... appear *under* their parent window, ... bad idea to have dialogs with NULL parents. ... part of the window from a resource resource (has a few entry ...
    (microsoft.public.vc.mfc)
  • Re: Creating popup dialog as child of a view
    ... of a problem with ALT+TAB (Task Switcher) where if I set the Parent ... once there are more than a few dialogs opened, ... setting desktop window as an owner may be a source of unexpected behavior. ...
    (microsoft.public.vc.mfc)
  • Re: OT: More Win 7 observations
    ... behind the window, ... In this movie you even *point out* the special cursor. ... Why not at least have the icon of the program like Save dialogs do? ... Another reason it is odd that the print dialogs are *not* ...
    (comp.sys.mac.advocacy)