void DIALOG1::SetListValue(int Cname, CString AppName, CString KeyName, CString FileName)
{
int i;
CString sReceiveBuf[50];
for(i=0;i<=m_Listgroundrun.GetCount();i++)
{
CString temp[50],KeyNamep[50];
temp[i].Format("%d",i);
KeyNamep[i]=KeyName+temp[i];
m_Listgroundrun.GetText(i,sReceiveBuf[i]);
WritePrivateProfileString(AppName,KeyNamep[i],sReceiveBuf[i],FileName);
}}void DIALOG1::SaveValuedlg1()
{
SetListValue(IDC_LIST1,"DIALOG1","DIALOG1list",filepath);
}
这段代码是用来实现把列表框控件中的内容写入ini文件的,帮忙看看有什么问题呀,怎么不出结果?
我想实现的是程序自己判断List中有多少项,在把各项写入ini,起的KeyName是 SetListValue中起的名字+数字.
{
int i;
CString sReceiveBuf[50];
for(i=0;i<=m_Listgroundrun.GetCount();i++)
{
CString temp[50],KeyNamep[50];
temp[i].Format("%d",i);
KeyNamep[i]=KeyName+temp[i];
m_Listgroundrun.GetText(i,sReceiveBuf[i]);
WritePrivateProfileString(AppName,KeyNamep[i],sReceiveBuf[i],FileName);
}}void DIALOG1::SaveValuedlg1()
{
SetListValue(IDC_LIST1,"DIALOG1","DIALOG1list",filepath);
}
这段代码是用来实现把列表框控件中的内容写入ini文件的,帮忙看看有什么问题呀,怎么不出结果?
我想实现的是程序自己判断List中有多少项,在把各项写入ini,起的KeyName是 SetListValue中起的名字+数字.
解决方案 »
- 关于CGridCtrl的问题
- VC访问数据库用ODBC还是ADO
- DATE TIME PICKER 的最大时间
- 加100分请大哥们帮我看一下这个问题!!
- 系统服务编程
- 给大家拜个早年
- 如何在CListCtrl中实现某一行文字的闪烁效果?
- 字符串如何换行————————?
- 请问:关于CString(救命,上机考试)
- _stdcall 和_cdecl这两个关键字有什么作用呢?
- 有sina点点通的高手吗?
- 求救unresolved external symbol "public: void __thiscall CDataBrowserParamView::InsertGridCtrl(int)" (?InsertGridCtrl@C
----------------------------
应为 m_Listgroundrun.GetText(i, &sReceiveBuf[i]);
上面说:
Debug Assertion Failed!
Program:D:\Mpart\Debug\Mpart.exe
File: strcore.cpp
Line:519 For information on how your program can cause an assertion
failure,see the Visual C++ documentation on asserts. (Press Retry to debug the application)
这样的错误!
怎么解决呀?