Hello,
I am trying to create a program that takes steps. How can I, when the user clicks the "Next >" button it opens another dialog and closes the one just used? Thank you,
Well, you could call a EndDialog(#); on the dialog box when the user clicks next - so, you could return a different value for each button (ie back, next, etc). What you pass as the parameter is what is returned by DoModal(); For example,
CMyDlg d;
int nSel = d.DoModal();
(when EndDialog(1) is called from the CMyDlg class or whatever)
switch(nSel)
{
case -1: //cancel
case 1: //next
case 2: //back
//... whatever
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.