第1个回答 2014-11-12
1,在资源中增加 字符串资源 IDP_OLE_INIT_FAILED "OLE initialization failed. Make sure that the OLE libraries are the correct version." 同时在Resource.h文件中已经自动增加了该资源的定义了。
2,在stdafx.h文件中增加包含 #include <afxdisp.h>
3,在YourApp.cpp中的InitInstance中增加
// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}
AfxEnableControlContainer();
在ExitInstance中增加 AfxOleTerm(FALSE);本回答被网友采纳