|
-
March 26th, 2004, 08:23 AM
#1
Dialog problem/questions
I have a Modal dialog, Parent, and a button it that'll call a modeless dialog Child. I want to be able to have the Child dialog in the background and bring the Parent into the foreground with, say a Left mouseclick. I figured that since the Child dialog is modeless it can go behind the Parent no problem... but I cannot get it to work. I've tried this in the Parent OnLeftMouseClick...
Code:
this->SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW );
b/c after reading the MSDN pages I thought this should work... how do I accomplish this? Thanks...
-
March 26th, 2004, 09:03 AM
#2
Modeless dialog is not really a child of one that spawned it. Modal owns modeless
If you pass pointer to a desktop instead of this than modeless will stay on a top of desktop window.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
March 26th, 2004, 11:16 AM
#3
Originally posted by JohnCz
Modeless dialog is not really a child of one that spawned it. Modal owns modeless
If you pass pointer to a desktop instead of this than modeless will stay on a top of desktop window.
I probably wasn't clear but the Modal dialog is the Parent and the Child is Modeless... so shouldn't the Parent be able to be on top is one clicks on it? I don't want the Modeless Child dialog on top when it's not active.
-
March 26th, 2004, 11:25 AM
#4
Again: modeless is not a child in this scenario. Child window occupy parent’s client area and is contained to this area. Window has WS_CHILD style.
Modeless dialog has popup or overlap style.
Do this calling Create:
Code:
m_dlg.Create(CModelessDlg::IDD, GetDesktopWindow());
this will make desktop window owner of the modeless dialog.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
March 26th, 2004, 04:19 PM
#5
-
March 26th, 2004, 04:36 PM
#6
There are only 10 types of people in the world:
Those who understand binary and those who do not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|