Generally, a control is bound with a variable. After the control is deleted, it forgot to delete its corresponding DDX _ statement in dodataexchange. You only need to delete it.
It is recommended that the resource IDs in the resource be killed together.
Bytes ------------------------------------------------------------------------------------------------
The problem of dlgdata. cpp has recently been encountered in VC. Generally, the cause of this problem is:
1. During the migration dialog box, the parameter type of the control in the dialog box is incorrect.
For example, it is originally idc_list and displayed as 1000
Modification Method: Change the corresponding type to idc_list.
2. Some parameters in the DDX control do not have a solution in the DLG: Delete the corresponding parameters.
I hope the above methods will help you.
-----------------------------------------------------------
The control corresponding to an ID does not exist in your dialog box.
It is estimated that you have deleted the control on the interface, but have not deleted its ing relationship.
Here is where the asserted error occurs. line43 is marked
Hwnd cdataexchange: preparectrl (int nidc)
{
Assert (NIDC! = 0 );
Assert (NIDC! =-1); // not allowed
Hwnd hwndctrl;
M_pdlgwnd-> getdlgitem (NIDC, & hwndctrl );
If (hwndctrl = NULL)
{
Trace1 ("error: No data exchange control with ID 0x % 04x. \ n", NIDC );
* ****** Line43 ***** assert (false );
Afxthrownotsupportedexception ();
}
M_hwndlastcontrol = hwndctrl;
M_beditlastcontrol = false; // not an edit item by default
Assert (hwndctrl! = NULL); // never return NULL handle
Return hwndctrl;
}
The corresponding control type is not found.
There are three common cases: one is that the Control ID does not exist, the other is that the control is not created, and the third is that the control type is incorrect.
Look at the dodataexchange Function
In this case, the dialog box cannot be displayed, and the result is that the Control ID does not match the subsequent data, that is, they cannot exchange data. Therefore, if the preceding error occurs, narrow down the scope. all are in [dodateexchange. Check whether the control ID is correct.