occcont.cpp line 925运行错误 Debug Assertion Failed:表示缺少某个OCX控件。
参考方法:
https://jingyan.baidu.com/article/cdddd41cab6f6453cb00e1fc.html
https://blog.csdn.net/cqfdcw/article/details/78757618?utm_source=blogxgwz0
https://bbs.csdn.net/topics/392019437
编译正确,运行时显示: 运行程序,显示 Debug Assertion Failed programe: c:\windows\system32\xxx.dll file:E:\programs\vctools\occcont.cpp line:925 第925行有一个断言( ASSERT(。。。。。) )这个断言条件(即ASSERT后括号里的条件)在调试的时候没有得到满足,所以抛出了这个断言错误。但我想程序在别的机器上肯定可以跑,换了台机器就出错,应该不是代码问题,而是哪里设置不对。 再看Debug窗口里的Trace信息如下: control {6262d3a0-531b-11cf-91f6-c2863c385e30} failed. >>> Result code: 0×80040154 >>> Is the control is properly registered? Warning: Resource items and Win32 Z-order lists are out of sync. Tab order may be not defined well. 查看Result Code:0×80040154,发现是REGDB_E_CLASSNOTREG错误。结合下面的提示语句,Is the control is properly registered?。猜想是某个控件未被注册。然后查找 control的CLSID{6262d3a0-531b-11cf-91f6-c2863c385e30},发现是控件FlexGrid Control 6.0。该控件包含在Msflxgrd.ocx文件中。在网上下载该控件,因为是64位机器,将该文件拷贝入机C:\Windows\SysWOW64中,然后在命令提示符以及再以管理员身份两次注册:regsvr32 C:\Windows\SysWOW64\Msflxgrd.ocx。再次编译运行,顺利通过。