It is quite difficult to see why it is giving a debug assertion by looking at the above code. To have more clarity, start your program in debug mode (Press F5) and when it shows the assertion dialog, press retry. It will go to the line of the code that is failing the assertion. Copy that code here. It will be easier for us to understand why it is causing the assertion.
The immediate place after DDX_Text(...) that can cause the assertion is in CDataExchange::PrepareCtrl(int nIDC). Alernatively check whether the ID for your control is valid.
You can without any problems compile your code in debug mode after compiling it in release mode. The other way round might give problems in certain cases.
|