I have developed an SDI application in VC++ for displaying a text file in tree view (left side) and list view (right side). Now i want to make the list view editable. i want to edit each cell in the list view.Can any one please help me out or suggest something how to proceed. Thanks in advance. And below is the part of my code.
For tokenising and parsing the string:
void CLeftView::OnFileOpen()
{
CTreeCtrl& trCtrl = GetTreeCtrl();
HTREEITEM hItem,hsc;
CString pathname,strLine;
CString filename;
CFileDialog dlg(TRUE);
dlg.DoModal();
if(dlg.DoModal() == IDOK)
{
pathname=dlg.GetPathName(); }
CStdioFile File;
if(File.Open(pathname, CFile::modeRead)) {
while(File.ReadString(strLine)) {
int Position = 0;
CString Token;
CAtlString str(strLine);
CAtlString resToken,resToken1;
resToken = str.Tokenize(_T("-:, "), Position);
if(resToken != (_T(""))) hItem = trCtrl.InsertItem(resToken , 0, 2 );
while(resToken!="")
{
_tprintf_s(_T("Token: %s\n"), resToken);
resToken = str.Tokenize(_T("-:, "), Position);
hsc = trCtrl.InsertItem(resToken , 0, 2 ,hItem);
resToken = str.Tokenize(_T("-:, "), Position);
trCtrl.InsertItem(resToken , 0, 2 ,hsc);
resToken = str.Tokenize(_T("-:, "), Position);
trCtrl.InsertItem(resToken , 0, 2 ,hsc);
}
}
}