Debug Assertion failed! F:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp line:42

Source: Internet
Author: User
Tags assert
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, 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.