解决: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:]这个错误,一直也没有百度,不料想却弄了一个 ...
随机推荐
- NBUT 1028 该减肥了(简单递推)
[1028] 该减肥了 时间限制: 1000 ms 内存限制: 65535 K 问题描述 由于长期缺乏运动,Teacher Xuan发现自己的身材臃肿了许多,于是他想健身,更准确地说是减肥.Teach ...
- PhpStorm中文教程
PhpStorm中文教程 | 浏览:15972 | 更新:2014-06-10 21:14 1 2 3 4 5 分步阅读 PhpStorm是一款强大的IDE,非常适合于PHP开发人员及前端工程师.提供 ...
- HTmlTableTOExcel
function TableTOExcel() { //第一种方法 //var url = 'data:application/vnd.ms-excel;base64,' + encodeURICom ...
- laravel 自定义函数 使用
1.创建app/helpers.php 2.注册路径 { ... "autoload": { "files": [ "app/helpers.php& ...
- Bigtable: A Distributed Storage System for Structured Data
https://static.googleusercontent.com/media/research.google.com/en//archive/bigtable-osdi06.pdf Abstr ...
- P2296 寻找道路
#include <bits/stdc++.h> using namespace std; const int maxn = 10005; set<int> to[maxn]; ...
- P1091 合唱队形
水题 #include <bits/stdc++.h> using namespace std; const int maxn = 105; int main(int argc, char ...
- P1003 铺地毯
水题 #include <bits/stdc++.h> using namespace std; const int maxn = 10005; int n; int x, y, i; s ...
- Oracle存储过程基本语法 存储过程
Oracle存储过程基本语法 存储过程 1 CREATE OR REPLACE PROCEDURE 存储过程名 2 IS 3 BEGIN 4 NULL; 5 END; 行1: CREATE OR RE ...
- JdbcTemplae使用入门&&Spring三种连接池配置&&Spring配置文件引用外部properties文件
JdbcTemplate的使用 Spring为了各种支持的持久化技术,都提供了简单操作的模版和回调. JdbcTemplate 简化 JDBC 操作HibernateTemplate 简化 Hiber ...