debug assertion failed, file:dlgdata.cpp,line43

经常在删除已经添加的控件后,会出现以上错误

看看DoDataExchange函数

void CTransDlgBar::DoDataExchange(CDataExchange* pDX) { // CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CTransDlgBar) DDX_Control(pDX, IDC_EDIT_T17, m_edtRequest); //此控件已经不存在,此句人工删除 DDX_Control(pDX, IDC_EDIT3, m_edtMyZero); //此控件已经不存在,词句人工删除 DDX_Control(pDX, IDC_EDIT1, m_edtMxZero); DDX_Control(pDX, IDC_CHECK1, m_Disp2D); DDX_Control(pDX, IDC_BTN_TRANS, m_btnTrans); DDX_Control(pDX, IDC_EDIT2, m_EdtInBuf); DDX_Control(pDX, IDC_COMBO2, m_DeviceName); //}}AFX_DATA_MAP for(int i=0; i<20; i++) { m_edtTxd[i] = (CEdit *)GetDlgItem(IDC_EDIT_T1 + i); } }

你可能感兴趣的:(File)