我想在A对话框中点击按钮打开B对话框,然后在B对话框中点击按钮打开C对话框
或者这样连续打开多个对话框
我用DoModal只能打开一个对话框
还有个问题就是,当我打开B对话框时A对话框就关闭,打开C对话框时B对话框就关闭
我不知道用什么语句
以上就是我的问题
请高手给我解决下
谢谢!
或者这样连续打开多个对话框
我用DoModal只能打开一个对话框
还有个问题就是,当我打开B对话框时A对话框就关闭,打开C对话框时B对话框就关闭
我不知道用什么语句
以上就是我的问题
请高手给我解决下
谢谢!
那就ShowWindow(SW_HIDE)。
并不是关闭前一个对话框
可以在App中这样调用CDlgApp::InitInstance()
{
……
CDlgDlgA dlga;
m_pMainWnd = &dlga;
int nResponse = dlga.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
} CDlgDlgB dlgb;
nResponse = dlgb.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
CDlgDlgC dlgc;
nResponse = dlgc.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
……