解决:CWnd::SetWindowText报Assertion failure
参考资料:
http://www.cnblogs.com/tiancun/p/3756581.html
http://www.tc5u.com/mfc/2120698.htm
http://forums.codeguru.com/showthread.php?379745-setwindowtext-in-cdialog-ctor-causes-assertion-to-fail
出错代码:
CInfoDlg dlg;
dlg.GetDlgItem(IDC_STATIC)->SetWindowText(_T("来自Add.dll中DoModalDlg的消息"));
return dlg.DoModal();
里面第二行报assertion failure,原因是dialog还没有完成创建就去操作里面的控件,肯定要出错。把第二行的代码放到OnInitDialog中就行了。
解决:CWnd::SetWindowText报Assertion failure的更多相关文章
- Delphi2007 在Win10 下运行报错 Assertion failure
Delphi2007 原来安装在Win7 下 运行正常, 自从升级到Win10 ,新建工程运行然后关闭报错, 报错信息如下: ---------------------------bds.exe - ...
- ios AFNetworking 3.0 报错 : *** Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:],
AFNetWorking[:] *** Assertion failure -- :::] *** Terminating app due to uncaught exception 'NSInter ...
- Assertion failure in UITableViewCell layoutSublayersOfLayer解决办法
iOS6 设备在更新UITableViewCell的时候遇到了 Assertion failure in -[UITableViewCell layoutSublayersOfLayer:], /So ...
- Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:]
最近在项目中遇到了 Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] 这个 ...
- Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /Source
1. *** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /Sou ...
- *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory
报错提示: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndex ...
- Assertion failure in -[UIView layoutSublayersOfLayer:]
Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2935.137/UIView.m:8 ...
- Assertion failure layoutSublayersOfLayer:], /SourceCache
现象:代码在simulator上能够正常运行但是在真机上出现 Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/ ...
- Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]
今天遇到了Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]这个错误,一直也没有百度,不料想却弄了一个 ...
随机推荐
- Linux文件管理命令
cd /home 进入 '/ home' 目录' cd .. 返回上一级目录 cd ../.. 返回上两级目录 cd 进入个人的主目录 cd ~user1 进入个人的主目录 cd - 返回上次所在的目 ...
- 解决Ecshop因为动态ip问题登录后台自动退出
解决Ecshop因为动态ip问题登录后台自动退出 PHP 铁匠 2年前 (2013-07-21) 1130℃ 0评论 修改lib_base.php文件real_ip()函数,添加以下代码即可解 ...
- JavaScript 数组详解(转)
在程序语言中数组的重要性不言而喻,JavaScript中数组也是最常使用的对象之一,数组是值的有序集合,由于弱类型的原因,JavaScript中数组十分灵活.强大,不像是Java等强类型高级语言数组只 ...
- web.xml总结整理
web.xml 配置的详细解读 web.xml (部署描述符文件) 整理参考: 加载顺序 ServletContext-->listener->filter->srvlet ...
- activitydialog
给Activity设置Dialog属性,点击区域外消失:,activitydialog 1.在AndroidManifest.xml中给Activity设置样式: <activity ...
- 【转】const 是左结合的,若左边为空,则再向右结合
const 是左结合的,若左边为空,则再向右结合 一.指向 const 对象的指针指向 const 对象的指针,指的是指针指向的对象的内容是const的,不可修改,但指针本身(即指针的值)是可 ...
- java RMI
import java.rmi.*; public interface Hello extends Remote { public String getGreeting() throws Remote ...
- ASP.Net网站程序在编译发布部署后的后期修改
ASP.Net网站程序在发布部署后的后期修改 作者:东篱南山 这里说的后期修改是指网站编译发布并部署好之后,对程序进行的修改,即在不能更改现有代码的情况下,更改页面的显示或是更改业务逻辑.一般是在程序 ...
- TWICImage.SaveToStream内存泄漏的解决办法
这个BUG从2010到XE5一直没改.....只能自己写个函数来搞了 uses ActiveX; procedure WICImageSaveToStream(AWICImage: TWICImage ...
- pylint window下安装与使用
简介 Pylint 是一个 Python 代码分析工具,它分析 Python 代码中的错误,查找不符合代码风格标准(Pylint 默认使用的代码风格是 PEP 8)和有潜在问题的代码. Pylint ...