解决: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:]这个错误,一直也没有百度,不料想却弄了一个 ...
随机推荐
- 《Java核心技术卷二》笔记(三)正则表达式
正则表达式语法 一个正则表达式描述了字符串的构成规则(模式).如果一个具体的字符串正好符合正则表达式描述的这个规则,这个字符串就是与表达式匹配的.先看一下怎么描述这种规则,也就是正则表达式语法.正则表 ...
- [IT学习]sql 入门及实例
sql 是一种数据库查询语言,可以让你很快的查询到数据.其实一般情况下,你也可以采用excel来查询数据库数据. 但是人们通常认为sql会更加灵活和方便一些. sql学习的入门网站: http://w ...
- Thinkphp 不显示生成的验证码 【转载】
在调用验证码之前加上 ob_clean(); 不显示验证码的代码: public function verify(){ $verify = new \Think\Verify(); $verify-& ...
- material design——设计文档
http://www.uisdc.com/comprehensive-material-design-note
- P1970 花匠
状态定义是dp中非常重要的,可以直接影响到效率,如此题,第一种思路是: #include <bits/stdc++.h> using namespace std; const int ma ...
- UI auto test
java.home/lib/security/java.policy (Solaris/Linux) http://www.cnblogs.com/richaaaard/p/5091059.html ...
- centos 重启php-fpm
centos 重启php-fpm ps -ef | grep php-fpm 查看php-fpm的配置文件,然后从配置文件查看php-fpm的pid文件,然后, kill -SIGUSR2 `cat ...
- ThreadPoolExecutor 分析
一.从用法入手 Creates a thread pool that creates new threads as needed, but will reuse previously construc ...
- php---将数组转化为数组对象
例子:array(1){ [0]=>array( 'id'=>111, 'name'=>'aaaa' ) } 由上面的例子转化成下面对象,怎么转化?急急 急 谢谢array(1) { ...
- CSS优先级别计算
a.b.c.d,可以以这四种等级为依据确定CSS选择器的优先级: a-----style 行内样式 个数 +1000 b-----id 个数+100 c-----类 个数+10 d-----类型个数 ...