[wtl] Making a Wizard-Only app
-
Hi, I'm designing an application that consists of ONLY a wizard. I use this code to show it. int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT) { CMainWizard wizard; if ( IDOK == wizard.DoModal() ) { } return 0; } The rest of the code is default wizard code. It all works perfectly but when i close the wizard with the cancel button i get a first chance exeception. It think this is because Run() always returns zero. What should i do to let it exit in an ordinate fashion? Thnx:)
-
Hi, I'm designing an application that consists of ONLY a wizard. I use this code to show it. int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT) { CMainWizard wizard; if ( IDOK == wizard.DoModal() ) { } return 0; } The rest of the code is default wizard code. It all works perfectly but when i close the wizard with the cancel button i get a first chance exeception. It think this is because Run() always returns zero. What should i do to let it exit in an ordinate fashion? Thnx:)
i dont think that the error is caused by your return code, you need to step into the code on the cancel button handler and try to "isolate" the line that causes the exception, watch variables and go line by line till you find out whats wrong. If you still cant find whats wrong, post the code for your CMainWizard class so we can help you find the problem. HTH