MFC >> How to make active dialog window on the top of the screen?
I have a modeless based dialog which have several child or grant child
modeless based dialog. But child dialog always on top of the main
dialog even the main dialog is active.
How to make active dialog window on the top of the screen?
MFC >> How to make active dialog window on the top of the screen?
You must create the child windows with the same parent as the parent window,
that way they can be at the same level. Otherwise the children will always
be on top of the child.
for example if CMainDialog is the main application dialog (parent desktop)
then if you are creating children within CMainDialog do it this way
m_MyDlg.Create(CMyDlg::IDD,GetDesktopWindow());
AliR.
> I have a modeless based dialog which have several child or grant child
> modeless based dialog. But child dialog always on top of the main
> dialog even the main dialog is active.
>
> How to make active dialog window on the top of the screen?
>
MFC >> How to make active dialog window on the top of the screen?
Yes, that's how dialogs are supposed to work.
You would have to do a lot more work to figure out how to do this. One of the most common
solutions which may be proposed is to make the parent of the dialog be the desktop. This
is one of the worst possible solutions, because it means that the other dialogs can then
be hidden by any other app, including your own main dialog. I once used a truly awful
product that thought this was cool. It was a product designed and implemented by people
who were completely clueless about how to write good software.
joe
>I have a modeless based dialog which have several child or grant child
>modeless based dialog. But child dialog always on top of the main
>dialog even the main dialog is active.
>
>How to make active dialog window on the top of the screen?
Joseph M. Newcomer [MVP]