解决: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:]这个错误,一直也没有百度,不料想却弄了一个 ...
随机推荐
- CentOs 6.6 安装配置 SVN
① 挂载光盘 mount /dev/cdrom /mnt/cdrom ② yum 安装 svn yum -y install subversion ③ 创建svn 版本库根目录 mkdir -p /w ...
- 总结的一些PHP开发中的tips
总结的一些PHP开发中的tips 发布时间:2013-05-28 12:47:44 来源: 评论:0 点击: 次 [字号:大 中 小] QQ空间新浪微博腾讯微博人人网豆瓣网百度空间百度搜藏开心 ...
- 20145317彭垚《Java程序设计》实验二
20145317<Java程序设计>实验二Java面向对象程序设计实验报告 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装.继承.多态 初步掌握UML建模 熟悉S.O. ...
- Java中同步
解决资源共享的同步操作,有两种方法:一是同步代码块,二是同步方法. 在需要同步的代码块加上synchronized关键字, 同步代码块时必须指定一个需要同步的对象,但一般都是将当前对象(this)设置 ...
- Python For Data Analysis -- IPython
IPython Basics 首先比一般的python shell更方便一些 比如某些数据结构的pretty-printed,比如字典 更方便的,整段代码的copy,执行 并且可以兼容部分system ...
- [转自小兵的工具箱]C++ Builder 基础
1. C++ Builder 网上资源 C++ Builder 研究 http://www.ccrun.com/ C++ Builder 程序员 http://mybcb.diy.myri ...
- Oracle用户、权限、角色管理(转)
http://blog.csdn.net/junmail/article/details/4381287 Oracle 权限设置一.权限分类:系统权限:系统规定用户使用数据库的权限.(系统权限是对用户 ...
- 【No.3 Ionic】超级逗表情 App
本人使用Ionic框架开发了一个 超级逗表情 的App 依赖插件 cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plu ...
- 蓝牙—服务发现协议(SDP)
服务搜索协议(SDP)提供了应用发现可用服务以及确定可用服务特点的方法.SDP发现协议提供下面的能力 <1>为客户提供搜索所需要服务的能力. <2>允许基于服务类型搜索服务 & ...
- VS2013编译Qt5.6.0静态库(乌合之众)
获取qt5.6.0源码包 直接去www.qt.io下载就好了,这里就不详细说了. 这里是我已经编译好的** 链接:http://pan.baidu.com/s/1pLb6wVT 密码: ak7y ** ...