CDialog断言在VS2005上失败(在VC6上没问题) [英] CDialog assertion failed on VS2005 (it woked fine on VC6)

查看:114
本文介绍了CDialog断言在VS2005上失败(在VC6上没问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在VC ++ Visual Studio 6.0中使用了CDialog类,该类工作正常,但是现在当我在Visual Studio 2005中使用CDialog类时,我遇到了调试断言"失败的问题

到底是什么原因?

谢谢
Pritha

解决方案

解决此类问题的最佳方法是首先使用调试器查看问题出在哪里以及原因为何.然后,如果遇到问题,请回到此处,并发布您在调试器中收集的所有信息.
这么少的信息根本无法找到问题所在.


确保所有IDC_ *常量均有效.可能有一个或多个常量(在resource.h中定义),但在实际的对话框资源中则没有. .看一下断言在哪里触发,看看是否可以重新处理代码并查看导致它的原因.
干杯,


Hello,

I have used CDialog class in VC++ Visual Studio 6.0 which worked fine but now when I use the same in Visual Studio 2005 I m facing the problem of Debug Assertion failure

Wht must be the reason?

Thanks
Pritha

解决方案

The best way to fix a problem like that is to first use your debugger to see where things went wrong and for what reason. Then, if you are stuck, come back here and post all the information you gathered with the debugger.
There''s no way somebody is going to find what the problem is with so little information.


Ensure all IDC_* constants are valid. There might be one or more constants (defined in resource.h) but not in actual dialog resource.


You cause an assertion when you do something MFC''s programmers thought was a big dodgy. Have a look at where the assertion is fired and see if you can work back to your code and see what caused it.

Cheers,

Ash


这篇关于CDialog断言在VS2005上失败(在VC6上没问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆