CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    48

    How to make a dialog window not always on top?

    In a dialog based windows program, I can create another modeless dialog window by showing it, such as:

    NewDialog.ShowWindow(SW_SHOW);



    The problem is that such a window is always floating on top of the parent window. I even tried
    SetWindowPos(WindBottom, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE), and it still stayed on
    top. How do I solve this problem?

    BTW: When this is done with SDI application, everything is just fine. I don't understand why
    Dialog based application is not working.

    [email protected]


  2. #2
    Guest

    Re: How to make a dialog window not always on top?

    Try using NewDialog.ShowWindow( SW_HIDE ) when you don't want it on top and then when you do want it on top NewDialog.ShowWindow( SW_SHOW )


  3. #3
    Join Date
    Apr 1999
    Posts
    48

    Re: How to make a dialog window not always on top?

    Yes, that's what I had to do: hide the modeless window when it is not active. But I want the window
    is still visible while it is not active or even partially overlaped. Any better idea?

    Thanks a lot for your comment.

    [email protected]


  4. #4
    Join Date
    Nov 2003
    Posts
    36

    Unhappy sa here

    i have the same problem..
    can someone help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured