I'm trying to get a DialogBox with a check box to appear. I added it to the resource file, created the dialog template, and added the class and event handler for the dialog. As I understand it, now I just need to create an instance of the class and call DoModal().
So, I've gone back and done some investigating and played with the code some and this is what I have now
UsingMSPSK PSKDialog; if( PSKDialog.DoModal() == IDOK) { } else { AfxMessageBox("Not IDOK"); } CTempoDialog TempoDialog; if(TempoDialog.DoModal() == IDOK) { }
When I run this, I get no dialog from the PSLDialog.DoModal() call, but I get the AfxMessageBox, then The TempoDialog appears. I stepped through the DoModal() call in the debugger and it seemed to run and return properly, so I can't figure out where my Dialog Box is going.
I just looked at the return value of the DoModal() call again, and it seems that it is exiting immediately, how can I fix that?