积极答复者
CListCtrl 崩溃

问题
-
求助:
使用CListCtrl时,在
nCol = listItems->InsertColumn(0, &lvColumn);
偶尔发生崩溃,有人遇到这样的问题吗?
CListCtrl* listItems = (CListCtrl*)GetDlgItem(IDC_LIST_DOWNLOADING);
listItems->SetExtendedStyle(listItems->GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
LVCOLUMN lvColumn;
int nCol;
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_FIXED_WIDTH | LVCFMT_NO_TITLE;
lvColumn.cx = 0;
nCol = listItems->InsertColumn(0, &lvColumn);
答案
-
。。。。VisualEleven应该问的是在什么函数里调用的吧,你应该说说你这段代码是在什么样的状况下运行的,还有vs版本和系统版本。
我没有碰到这种情况,你确定没有任何错误信息,断言错误什么的吗。
偶尔发生崩溃,有人遇到这样的问题吗?
你说的偶尔到底是什么样状态下会崩溃,就你分享出来的代码来看我看不出什么问题,所以问题应该在你没有给出的代码里。你需要去调试你的代码,确保每个指针都是有效的,比如listItems 是不是NULL。你给的信息太少看不出问题来啊。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
全部回复
-
。。。。VisualEleven应该问的是在什么函数里调用的吧,你应该说说你这段代码是在什么样的状况下运行的,还有vs版本和系统版本。
我没有碰到这种情况,你确定没有任何错误信息,断言错误什么的吗。
偶尔发生崩溃,有人遇到这样的问题吗?
你说的偶尔到底是什么样状态下会崩溃,就你分享出来的代码来看我看不出什么问题,所以问题应该在你没有给出的代码里。你需要去调试你的代码,确保每个指针都是有效的,比如listItems 是不是NULL。你给的信息太少看不出问题来啊。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.