From: Patrik Stellmann on
Hi,

I need to "detach" a non-modal dialog within an MFC MDI-application from
the mainframe. This means, it should no more activate the mainframe when
it is beeing activated. Using SetWindowPos() with hWndInsertAfte =
wndTopMost almost works (I can see the dialog on top of another
application where effects of the dialog become visible) but when
clicking on the dialog the it's mainframe is activated again.
I once got the desired behavior (also with an own entry for the dialog
in the task-bar) by setting the parent of the Dialog to NULL but it also
should be toggable and calling SetParent(NULL) does not work.

Any ideas?

Thanx in advance!

Patrik
From: AliR (VC++ MVP) on
You will have to create it with the same parent as the parent of the main
frame which is the desktop!

See this thread from last week. The same concept applys here.
http://groups.google.com/group/microsoft.public.vc.mfc/tree/browse_frm/thread/21c4b7c5f9cadc9e/46b613096ced0c22?rnum=1&q=CPropertysheet+in+front+of+modeless&_done=%2Fgroup%2Fmicrosoft.public.vc.mfc%2Fbrowse_frm%2Fthread%2F21c4b7c5f9cadc9e%2Fe06a80cc9ed22f3a%3Flnk%3Dgst%26q%3DCPropertysheet%2Bin%2Bfront%2Bof%2Bmodeless%26rnum%3D1%26#doc_46b613096ced0c22

AliR.

"Patrik Stellmann" <stellmann(a)tu-harburg.de> wrote in message
news:46188fcb$0$23144$9b4e6d93(a)newsspool1.arcor-online.net...
> Hi,
>
> I need to "detach" a non-modal dialog within an MFC MDI-application from
> the mainframe. This means, it should no more activate the mainframe when
> it is beeing activated. Using SetWindowPos() with hWndInsertAfte =
> wndTopMost almost works (I can see the dialog on top of another
> application where effects of the dialog become visible) but when clicking
> on the dialog the it's mainframe is activated again.
> I once got the desired behavior (also with an own entry for the dialog in
> the task-bar) by setting the parent of the Dialog to NULL but it also
> should be toggable and calling SetParent(NULL) does not work.
>
> Any ideas?
>
> Thanx in advance!
>
> Patrik