What the difference between
Why do we need to do this to convert a string into a
_ITEM structure variable
LV_DISPINFO dispinfo; dispinfo.item.pszText = LPTSTR((LPCTSTR)string);
To answer the first part of your question:
LPCSTR is a const string
LPCTSTR is a
const TCHAR string, (
TCHAR being either a wide char or char depending on whether UNICODE is defined in your project)
LPTSTR is a (non-const)
This is a great codeproject article describing C++ strings (see 2/3 the way down for a chart comparing the different types)
Quick and dirty:
LP == Long Pointer. Just think pointer or char*
C = Const, in this case, I think they mean the character string is a const, not the pointer being const.
STR is string
T is for a wide character or char (TCHAR) depending on compile options.