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?
Printable View
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?
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.
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!