Click to See Complete Forum and Search --> : How to make modeless dialog NOT the topmost?


Doug Sisco
April 8th, 1999, 01:24 PM
I created a modeless dialog box but it remains the topmost window even when I select other windows in my application. How can make it behave like a normal window?

Remek Zajac
April 8th, 1999, 01:33 PM
Hello,

Well, obviously this is all a speculation, since it's hard to implement every advice and see it working, but:

Did You try? :
CWnd::SetWindowPos(CWnd::wndNoTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );

A CDialog as You know inherits CWnd.

good luck
Rem.

Doug Sisco
April 8th, 1999, 02:25 PM
Yep, I tried
GridDlg->SetWindowPos(&GridDlg->wndNoTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );

and
GridDlg->ModifyStyleEx(WS_EX_TOPMOST,SWP_NOSIZE);
without success.

The dialog just refuses to go behind the main application window even though the application window has focus!