大家好,我现在真的好绝望!!我们在做一个毕业设计,用VC++,遇到一个问题,花了一周的时间,好无结果,真的好绝望,希望高手能帮帮我们啊。真的很感激
错误信息是:For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
我把代码传上来了。,下面是调试的时候有问题的代码,好想是断言的问题,高手们,前辈们,帮帮忙啊
#include "stdafx.h"
#include "occimpl.h"
#ifdef AFX_CORE3_SEG
#pragma code_seg(AFX_CORE3_SEG)
#endif
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDataExchange member functions (contructor is in wincore.cpp for swap tuning)
HWND CDataExchange::PrepareEditCtrl(int nIDC)
{
HWND hWndCtrl = PrepareCtrl(nIDC);
ASSERT(hWndCtrl != NULL);
m_bEditLastControl = TRUE;
return hWndCtrl;
}
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);//问题大概就在这个地方!!!!!!!!!!!!!
ASSERT(FALSE);
AfxThrowNotSupportedException();
}
m_hWndLastControl = hWndCtrl;
m_bEditLastControl = FALSE; // not an edit item by default
ASSERT(hWndCtrl != NULL); // never return NULL handle
return hWndCtrl;
}