I want all the dialogs and the propsheet to be able to be the
front most window if/when it is clicked on.
I've got all the dialogs working this way by making them all
children of the propsheet. They're all siblings and each of them
snaps to the foreground when clicked on.
Only thing I haven't figured out is how to get the propsheet
(CPropertySheet) to reach the foreground when clicked on. It
gains focus of course but remains "behind" any of the child
CDialogs that happen to overlap it.
I've experimented with various z-order settings to no avail.
Is there a way to accomplish this?
I'm using VS2005. I believe this same behavior applies to an
app with a CDialog as the main app so I think the fix would
apply to both.
Thanks,
Mike
If the property sheet is the main window of your app, then you will need a
hidden main window that has the propertysheet as a child, and all the child
modeless dialog will have to have the propertysheet's parent as their
parent.
AliR.
"Mike M" <nos...@nospam.com> wrote in message
news:euh45...@enews2.newsguy.com...
It's just a CWinApp derived obj that calls DoModal on the property
sheet. Created with the wizard as a dialog app then converted to prop sheet.
> If the property sheet is the main window of your app, then you will need a
> hidden main window that has the propertysheet as a child, and all the child
> modeless dialog will have to have the propertysheet's parent as their
> parent.
Ok cool. I was thinking that but not yet sure how to go about it. But
that helps. I suppose I could make the propertysheet modeless and put
the CWinApp in a message loop?
Thanks,
Mike
No, that's not what I said, I said you need a hidden window as the main
window. The property sheet can be modal if it wants to be, but it needs to
be a child of the hidden window. And the child windows of the proprty sheet
also need to have the hidden window as their parent.
I didn't say anything about making propertysheet modeless or a messsage
loop.
for simplicity I create a dlg that's hidden. You can create a CWnd if you
like.
BOOL CLSTeacherApp::InitInstance()
{
....
CHiddenDlg HiddenWnd;
HiddenWnd.Create(CHiddenDlg::IDD);
CPropertyDlg dlg(&HiddenWnd);
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
....
return FALSE;
}
Then in your propretysheet
m_ChildDlg.Create(CChildDlg::IDD,GetParent());
if you are creating it from the propetypage
ASSERT(GetParent());
m_ChildDlg.Create(CChildDlg::IDD,GetParent()->GetParent());
AliR.
Thanks,
Mike
AliR.
"Mike M" <nos...@nospam.com> wrote in message
news:eujos...@enews5.newsguy.com...
Thanks,
Mike
AliR.
"Mike M" <nos...@nospam.com> wrote in message
news:eumi7...@enews4.newsguy.com...
So I merely commented out the Create call and everything's workin
fine.
Thanks