Code runs correctly everytime when started with F10 with cursor within the IF statement code, will not run correctly normally.
Posted on 2006-05-09
I have a piece of WTL C++ code that I have written, which works fine if it is run in debug mode (i.e. when started with F10 with say the cursor within the Message box code (which means the program runs correctly without stopping)), all the variables are returning correct values but when I run the code started normally it runs the error message box everytime, I cannot find the problem because it always works correctly when debugging, Any ideas please, a fragment of the code is included to assist. ComboEdit.ReadComboBox is an external class method, ReadRadioButton and ClearRadioButton are simple methods within this class, all of which work OK. This is being compiled in debug mode, not release mode incidentally.
fDepthLog = atof(ComboEdit.ReadComboBox(hwndTool1LoggingInterval));
MessageBox("Logging Interval NOT Yet Selected", _T(ErrorBoxString), MB_ICONERROR|MB_OK);
//Error box if user has not selected a value in the combo box.
Help please, this code should be elementary but its unexpected behaviour is driving me nuts.