convert CSting to LPTSTR
Posted on 2000-05-13
In using a ListCtrl, the lvItem.pszText must be a type of LPTSTR. I get a CString from another ListCtrl( m_FileList.GetItemText(i,0)) .Then how to give the CString to the lvItem.pszText?
I searched the PAQ and tried several ways like these:
lvItem.pszText = (LPTSTR) m_FileList.GetItemText(i,0).GetBuffer(0);
but they all can't work. I am really confused. Who can tell me the difference between CString, string, char *str, LPTSTR....? How to make this work?