RAJESH SHARMA
asked on
Hide Dialog Box Clicking on the command button?
Hi all
I would like to explain my question.
I insert three dialog box(d1,d2 and d3) and also make their classes for each dialog box(CD1,CD2 and CD3), derived from CDialog.d1 contains two button "Back and Next".On Clicking on the "Next" button, it calls d2(second dialog box).d2 also contains two button "Continue and Cancel".Again I press the "Continue" button, it calls d3(third dialog box).
Now I want to do that when I click on "Continue" button,it calls d3 and dismiss(hide) the both dialog box(d1 and d2)simultaneously.
I wrote code something like that:
void CD1::OnNext()
{
CD2 dlg2;
dlg2.DoModal();
}
............
..............
void CD2::OnContinue()
{
CD3 dlg3;
dlg3.DoModal();
.......................... .......... ..........
.......................... .........
}
Please help me
How to write code on the "Coninue" button so that d1 and d2 will be hide together?.
Please Excuse my bad writting for i have a poor way of writting
Regards
Rajesh
I would like to explain my question.
I insert three dialog box(d1,d2 and d3) and also make their classes for each dialog box(CD1,CD2 and CD3), derived from CDialog.d1 contains two button "Back and Next".On Clicking on the "Next" button, it calls d2(second dialog box).d2 also contains two button "Continue and Cancel".Again I press the "Continue" button, it calls d3(third dialog box).
Now I want to do that when I click on "Continue" button,it calls d3 and dismiss(hide) the both dialog box(d1 and d2)simultaneously.
I wrote code something like that:
void CD1::OnNext()
{
CD2 dlg2;
dlg2.DoModal();
}
............
..............
void CD2::OnContinue()
{
CD3 dlg3;
dlg3.DoModal();
..........................
..........................
}
Please help me
How to write code on the "Coninue" button so that d1 and d2 will be hide together?.
Please Excuse my bad writting for i have a poor way of writting
Regards
Rajesh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you looked at a property sheet in wizard mode? I suspect this is what you are trying to code by hand.
Thx for the points. I wrote it between the lines what AndyAinscow spoke out loud: Consider a different approach like property sheets, a tabbed dialog with sub-dialogs for these tasks.