Hi guys..
In my dialog, under void Class::DoDataExchange(CDataExchange* pDX), whenever i call DDX_Control(pDX, IDC_SOMETHING, m_VAR);, I got problem.
After some digging, the problem is the function below.
HWND CDataExchange::PrepareCtrl(int nIDC)
{
ASSERT(nIDC != 0);
ASSERT(nIDC != -1); // not allowed
HWND hWndCtrl;
m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); //<---- hWndCtrl = 0
if (hWndCtrl == NULL)
{
TRACE1("Error: no data exchange control with ID 0x%04X.\n", nIDC);
ASSERT(FALSE);
AfxThrowNotSupportedException();
}
Actually, previously the baseclass of the dialog is CPropertyPage. I then convert it to CDialog. That could contribute to the problem.
Can somebody please advice me on how to solve it..? I've spend a very long time trying to find the solution but still no result.
Thanks..