In MFC, MSVC++ 6.0, I have an activeX control that contains a window of a class (CMyFormView) derived from CFormView. Inside that window I am trying to use CWnd::CreateControl() to load another activeX control inside the "container" activeX control. The CLSID of the activeX control i'm trying to load is in the string "pData".
In my CMyFormView class of the "container" activeX control, I have the code in the OnDrop message handler:
m_control.CreateControl(pData, NULL, 0, m_rHotRect, this, 110001, NULL, FALSE, NULL);
m_control is a CWnd object.
Everything builds fine, but when I run the app, I get a runtime crash...
"Unhandled exception at 0x5f47c2cc (MFC42D.DLL) in containerapp.exe: 0xC0000005: Access violation reading location 0xcdcdcdd1."
Containerapp.exe is the MFC container application that I created to host the controls. That's all the information I have and I know it's crashing at the CreateControl function. Has anything seen anything like this before? Are there any gotcha's that I should know about when loading activeX controls inside other activeX controls?
Thanks in advance.
In my CMyFormView class of the "container" activeX control, I have the code in the OnDrop message handler:
m_control.CreateControl(pData, NULL, 0, m_rHotRect, this, 110001, NULL, FALSE, NULL);
m_control is a CWnd object.
Everything builds fine, but when I run the app, I get a runtime crash...
"Unhandled exception at 0x5f47c2cc (MFC42D.DLL) in containerapp.exe: 0xC0000005: Access violation reading location 0xcdcdcdd1."
Containerapp.exe is the MFC container application that I created to host the controls. That's all the information I have and I know it's crashing at the CreateControl function. Has anything seen anything like this before? Are there any gotcha's that I should know about when loading activeX controls inside other activeX controls?
Thanks in advance.