connecting between two dialogs
-
visual C++ 1. i have created a dialog based project COldDlg. 2. then i added a new dialog resource CNewDlg. 3. i need that the old dialog sees the new one and controls its member variables and when the OnOK() of the new dialog executes it returns to the old dialog. in other words i need to achieve the following commands: COldDlg::OnCalculate() { CNewDlg dlg2; dlg2.DoModal(); m_new=m_old;// where m_old,m_new are 2 member variables of the old and new dialoge respectively } when i made the above statements the builder tells me that CNewDlg is undefined declaration. can anyone give me a detailed answer(in steps and forward plzzzzzzz) i can rebuild the new dialog again if needed:laugh:
-
visual C++ 1. i have created a dialog based project COldDlg. 2. then i added a new dialog resource CNewDlg. 3. i need that the old dialog sees the new one and controls its member variables and when the OnOK() of the new dialog executes it returns to the old dialog. in other words i need to achieve the following commands: COldDlg::OnCalculate() { CNewDlg dlg2; dlg2.DoModal(); m_new=m_old;// where m_old,m_new are 2 member variables of the old and new dialoge respectively } when i made the above statements the builder tells me that CNewDlg is undefined declaration. can anyone give me a detailed answer(in steps and forward plzzzzzzz) i can rebuild the new dialog again if needed:laugh:
-
visual C++ 1. i have created a dialog based project COldDlg. 2. then i added a new dialog resource CNewDlg. 3. i need that the old dialog sees the new one and controls its member variables and when the OnOK() of the new dialog executes it returns to the old dialog. in other words i need to achieve the following commands: COldDlg::OnCalculate() { CNewDlg dlg2; dlg2.DoModal(); m_new=m_old;// where m_old,m_new are 2 member variables of the old and new dialoge respectively } when i made the above statements the builder tells me that CNewDlg is undefined declaration. can anyone give me a detailed answer(in steps and forward plzzzzzzz) i can rebuild the new dialog again if needed:laugh: