C++ Programming
01-16-2010, 06:30 PM
I am trying to build a application consists of four dialogs(Dialog A, dialog B, Dialog C and Dialog D).
In dialog A is you press next button it will go to dialog B, at dialog B if you press cancel button it will go back to dialog A. If next button of dialog B is clicked then it will proceed to dialog C and so on.
For the last dialog, Dialog D, if the Finish button is clicked, it will go back to dialog A.
How can I link all the dialogs to work in the sequence specified.
Should I add dialog B,C,D as custom dialog to dialog A?
In dialog A I wrote the code shown below.where is member variable of CtryDlg which declared as CBDlg type.
/*tryDlg.cpp*/
#include "BDlg.h"
void CtryDlg::OnNext()
{
int nRet = m_dBDlg.modal();
}
In dialog B,
void CBDlg::OnCancelB()
{
int nRet = 5;
EndDialog(nRet);
return;
}
But I keep getting Debug Assertion Failed error when the next button of Dialog A is clicked.
Can someone give me so suggestions?
Thanks.
In dialog A is you press next button it will go to dialog B, at dialog B if you press cancel button it will go back to dialog A. If next button of dialog B is clicked then it will proceed to dialog C and so on.
For the last dialog, Dialog D, if the Finish button is clicked, it will go back to dialog A.
How can I link all the dialogs to work in the sequence specified.
Should I add dialog B,C,D as custom dialog to dialog A?
In dialog A I wrote the code shown below.where is member variable of CtryDlg which declared as CBDlg type.
/*tryDlg.cpp*/
#include "BDlg.h"
void CtryDlg::OnNext()
{
int nRet = m_dBDlg.modal();
}
In dialog B,
void CBDlg::OnCancelB()
{
int nRet = 5;
EndDialog(nRet);
return;
}
But I keep getting Debug Assertion Failed error when the next button of Dialog A is clicked.
Can someone give me so suggestions?
Thanks.