CDialog SetParent
-
I want to change the parent of a dialog so that its parent is the top level dialog (i.e. my main app). What is the correct way of doing this as when I get a pointer to the main dialog and use that the main app stops refreshing its display. What I want is something like this: MainApp->Modeless Dialog->Modeless Dialog->Modal Dialog attached to MainApp I can get this working by callbacks through the code but thought that by simply doing modal_dialog->SetParent ( main_app ) would have the same effect but it doesn't. cheers, Andy
-
I want to change the parent of a dialog so that its parent is the top level dialog (i.e. my main app). What is the correct way of doing this as when I get a pointer to the main dialog and use that the main app stops refreshing its display. What I want is something like this: MainApp->Modeless Dialog->Modeless Dialog->Modal Dialog attached to MainApp I can get this working by callbacks through the code but thought that by simply doing modal_dialog->SetParent ( main_app ) would have the same effect but it doesn't. cheers, Andy
Use the ctor. CDialog::CDialog (MFC)[^]
explicit CDialog(
LPCTSTR lpszTemplateName,
CWnd* pParentWnd = NULL
);
explicit CDialog(
UINT nIDTemplate,
CWnd* pParentWnd = NULL
);
Maxwell Chen
-
Use the ctor. CDialog::CDialog (MFC)[^]
explicit CDialog(
LPCTSTR lpszTemplateName,
CWnd* pParentWnd = NULL
);
explicit CDialog(
UINT nIDTemplate,
CWnd* pParentWnd = NULL
);
Maxwell Chen