1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
CString str,strClef;
AfxGetApp()->WriteProfileString("Section",NULL,NULL);
for(int i=0;i<m_ListBox.GetCount();i++)
{
m_ListBox.GetText(i,str);
strClef.Format("%d",i);
AfxGetApp()->WriteProfileString("Section",strClef,str);
}
str.Format("%d",m_ListBox.GetCount());
AfxGetApp()->WriteProfileString("Section","Size",str);
m_ListBox.ResetContent();// vidage listbox
int nSize=atoi(AfxGetApp()->GetProfileString("Section","Size","0"));
for(i=0;i<nSize;i++)
{
strClef.Format("%d",i);
m_ListBox.AddString(AfxGetApp()->GetProfileString("Section",strClef,""));
} |
Partager