This article from: Http://tunps.com/mfc-dlgdata-cpp
Debug Assertion failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp line:42
Debug Assertion failed! F:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp line:42
---------------------------
Microsoft Visual C + + debug Library
---------------------------
Debug Assertion failed!
Program:d:\dev\debug\qzone2wp.exe
file:f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp
line:42
For information about your program can cause
a assertion failure, see the Visual C + + documentation on asserts.< c10/> (press Retry to debug the application)
---------------------------
Terminate (A) retry (R) ignore (I)
---------------------------
Open MFC source code file Dlgdata.cpp error Line:
HWND CDataExchange::P reparectrl (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)
; ASSERT (FALSE);
Afxthrownotsupportedexception ();
}
M_hwndlastcontrol = Hwndctrl;
M_beditlastcontrol = FALSE; Not a edit item by default
ASSERT (Hwndctrl! = NULL); Never return NULL handle
return Hwndctrl;
}
DebugView inside Error:
It is true that the control with ID 0x400 (1024) has DDX and the control is removed in the interface without deleting the associated variable
The problem is because the control is removed from the interface, but the corresponding DDV is not deleted.
void Cqzone2wpdlg::D odataexchange (cdataexchange* pdx) {CDialog::D odataexchange (PDX); DDX_Control (PDX, Idc_userlist,