Debug Assertion Failed! f:\sp\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp Line: 42

31311 단어 line42dlgdata.cpp
본문 은 다음 과 같다.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 on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
---------------------------
  (A)     (R)     (I)   
---------------------------

mfc 소스 코드 파일 dlgdata. cpp 에서 오 류 를 보고 한 줄 을 엽 니 다:
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.
"
, nIDC); ASSERT(FALSE); AfxThrowNotSupportedException(); } m_hWndLastControl = hWndCtrl; m_bEditLastControl = FALSE; // not an edit item by default ASSERT(hWndCtrl != NULL); // never return NULL handle return hWndCtrl; }

DebugView 에서 오류 가 발생 했 습 니 다.
[6932] Error: no data exchange control with ID 0x0400. 

역시 아 이 디 0.×400 (1024) 의 컨트롤 은 DDX 를 사 용 했 고 관련 변 수 를 삭제 하지 않 은 상태 에서 인터페이스 에서 컨트롤 을 삭제 했다.
문제 의 원인 은 인터페이스 에서 해당 되 는 Control 을 삭 제 했 지만 해당 되 는 DDV 를 삭제 하지 않 았 기 때문이다.
void CQzone2WPDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_USERLIST, m_userList); //delete this line!
}

좋은 웹페이지 즐겨찾기