Click to See Complete Forum and Search --> : Main window not in Foreground


rob@iol.it
August 1st, 1999, 05:25 PM
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?

Alan Lu
July 17th, 2000, 10:14 PM
Hi,

I have the same problem, someone can help ?

Thanks

Laptop
July 17th, 2000, 10:44 PM
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.

wadeb
July 17th, 2000, 10:45 PM
Have you tried:

MyWindow->ShowWindow( SW_SHOW );



after you create the modeless dialog?

-Wade

July 18th, 2000, 03:01 PM
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

July 18th, 2000, 03:06 PM
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