VisualStudio2008,MFC智能设备应用程序,添加ActiveX控件不能运行
用VisualStudio2008建立MFC智能设备应用程序(Visual C++语言),在对话框上添加ActiveX控件不能正常运行,显示错误如下
Debug Asserton Failed
Program:\Program files\xxx\xxx.exe
File:
f:\dd\vctools\vc7libsce\ship\atlmfc\src\mfc\occcont.cpp
Line:936
(Press Retry to debug the application)
对程序调试,错误定位到
C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc\src\mfc\occcont.cpp
指示有问题的地方在以下语句中
COleControlSiteOrWnd *pTemp =new COleControlSiteOrWnd(hwndCtrl,pOccDlgInfo->m_pItemInfo[i].bAutoRadioButton);
ASSERT(IsWindow(pTemp->m_hWnd));