Need Solution to Chapter 20
I'm having a great deal of difficulty following what's going on in Chapter 20. I'm getting confused between company name and customer name, which he seems to use interchangeably. There are other inconsistencies with the naming of controls that are confusing me too.
My code wouldn't compile.
I compared my code with his and altered it where they differed. I also renamed the controls where I found differences in the names. This time it compiled, but I'm getting a run-time error in file dlgdata.cpp where it asserts false because pSite is NULL.
HWND CDataExchange::PrepareCtrl(int nIDC)
ASSERT(nIDC != 0);
ASSERT(nIDC != -1); // not allowed
COleControlSite* pSite = NULL;
if (hWndCtrl == NULL)
// Could be a windowless OCX
pSite = m_pDlgWnd->GetOleControlSite(nIDC);
if (pSite == NULL)
TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC);
m_idLastControl = nIDC;
m_bEditLastControl = FALSE; // not an edit item by default
Does anyone have the solution to this and would I be able to use it if I altered the database path to my machine?