Dear
I am working with the visual C++ version 6 for some programming in
which it can handle input and output data storage and data displaying
system. for all purpose I am using around 4 dialog boxes.
In one dialog(CReportDlg derived from CDialog) box I used an ActiveX Control named m_cell for output. In my main dialog I have defined:
CReportDlg dlg;
and I defined a button to call the CReportDlg like this:
void CMainDlg::OnButton(void)
{
dlg.m_cell.SetCols(6,0);//debug assertion£¡£¡£¡
dlg.m_cell.SetRows(100,0);//debug assertion!!!
...
dlg.DoModal();
}
The trueth is there will be a debug assertion while I call any m_cell's function in main dialog.
I figured that it comes from the line
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
which is inside:
void AFX_CDECL CWnd::InvokeHelper(DISPID dwDispID, WORD wFlags, VARTYPE vtRet,
void* pvRet, const BYTE* pbParamInfo, ...)
{
ASSERT(m_pCtrlSite != NULL); // not an OLE control (not yet, at least)
if (m_pCtrlSite == NULL)
return;
va_list argList;
va_start(argList, pbParamInfo);
m_pCtrlSite->InvokeHelperV(dwDispID, wFlags, vtRet, pvRet, pbParamInfo,
argList);
va_end(argList);
}
But what is m_pCtrlSite? It's COleControlSite* object in the afxwin.h file. Did I miss anything while using the ActiveX object?
Thanks in advance.
[email protected]