Two days ago, colleagues found a problem with EVC's dialog (Dialoga) program that appeared as: Release version Run Normal, but diagnostic macro errors occurred under Debug.
The program has bugs that are inevitable, so I started to catch the worm. First find an error based on the contents of the error prompt, it is found to be an error that occurs when the dialog is destroyed. But there is no additional execution statement when the dialog is destroyed, just simple calls CDIALOG :: Onok (). Once you have fallen into confused, suddenly think, is it because the resources have problems? So I tried another new generation of a dialog (Dialogb) to show and destroy, and found everything. Both of the two find that the error dialog (Dialoga) is only a number of variables bound by the control, is it because the variable has a problem? But with colleagues say that all variables are added via ClassWizard. No way, I have to add a corresponding variable in the normal dialog (Dialogb), and finally discovered the problem in the addition process: It turns out that there is a CEDIT control in the dialog to add two variables, a cstring, A CEDIT. Remove one after another, everything is normal!
The same control binds two variables are allowed in the VC, but it is not in the EVC (adding ClassWizard), it is indeed very strange.
For the first time, I wrote something, I feel very messy, continue to work hard later :)