Yet another dll question
-
I have a dll that contains a number of resources for dialog boxes. Since I am working on the PPC and it does not support wizards, I am trying to make my dialog boxes act like a wizard. I can get the first dialog box to open correctly and all is fine. When the user clicks "Next"(defined as IDOK), the systems calls the proper class to setup the next dialog, but it displays the first Dialog box. I have setup AfxMessageBox() at various points in the application to tell what is getting called and it does call the proper class. I have a single function exported from the dll that the main application calls to start the "wizard" Inside this function I have declared two objects, one for my first dialog box and one for my second dialog box.
void DLLEXPORT StartWizard() { CDialogOne dlg1; CDialogTwo dlg2; int nResult; nResult = dlg1.DoModal(); if(nResult == IDOK) { nResult == dlg2.DoModal(); } }
Each time this is run, I get the first dialog box displayed twice. Any ideas? Thanks, -Eric