Click here to Skip to main content
15,892,805 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to make a multiple dialogue application in which I can move forward and backward between different dialogues like we do in some setup files by pressing button Next and back , So far i am using doModal function , I can move in one direction i.e. forward but when I come back dialogue lost its functionality i.e. it doesn't move forward.
Here is the piece of code for first dialogue button:



OnOK();
New a; //second dialogue object
a.DoModal(); //
For Second one :


CDialog d (IDD_DIALOGCREATION_DIALOG);// first dialogue object
d.DoModal();
Posted
Comments
asadali.awan 27-Jan-14 3:29am    
What to do to solve this problem

A state machine could solve your problem: suppose you keep the state in a variable m_step. At first you set m_step=0 and you call a StateUpdatedHandler. This method looks at m_step value and calls the proper DoModal method (on m_step==0 it calls the first dialog's one). Once DoModal returns the m_step is updated (according to its result) and another dialog's DoModal is called. This loop goes on until the user completed the whole process (or aborts it).
 
Share this answer
 
I think you mean How to Create Wizards[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900