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

    Main window not in Foreground

    Environment: VC++ 5.0, Win 95
    When I create a modeless dialog box, it always appears on top of the main application window. How can I make it possible to bring the main window into the foreground?


  2. #2
    Join Date
    Jul 2000
    Posts
    30

    Re: Main window not in Foreground

    Hi,

    I have the same problem, someone can help ?

    Thanks


  3. #3
    Join Date
    Feb 2000
    Posts
    51

    Re: Main window not in Foreground

    Tell us a bit more. What window styles do you use for your modeless dialog box and your main application window? Just the ones different from the default at least. What is the parent of the modeless dialog box? I might not be able to help you, but I think that these are things that would help someone that can help you to help you.



  4. #4
    Join Date
    Jul 2000
    Posts
    43

    Re: Main window not in Foreground

    Have you tried:

    MyWindow->ShowWindow( SW_SHOW );



    after you create the modeless dialog?

    -Wade


  5. #5
    Guest

    Re: Main window not in Foreground

    after you create your window you may want to try calling CWnd::SetWindowPos

    //put main window back on top
    yourMainWnd->SetWindowPos(ow, NULL,NULL,NULL,NULL,
    SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW);

    hope that helps


  6. #6
    Guest

    Re: Main window not in Foreground

    oh! and the ow in it is a pointer to my output window that it's on top of, which works, but there's also different options for that parameter that look like they will work ...peace


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