<p>What the difference between <code>LPCSTR</code>, <code>LPCTSTR</code> and <code>LPTSTR</code>?</p>

<p>Why do we need to do this to convert a string into a <code>LV</code> / <code>_ITEM</code> structure variable <code>pszText</code>:  </p>

<pre><code>LV_DISPINFO dispinfo;  
dispinfo.item.pszText = LPTSTR((LPCTSTR)string);
</code></pre>

Quick and dirty:
```
LP
```
==
L
ong
P
ointer.  Just think pointer or char*
```
C
```
=
C
onst, in this case, I think they mean the character string is a const, not the pointer being const.
```
STR
```
is
string
the
```
T
```
is for a wide character or char (TCHAR) depending on compiler options.
Bonus Reading
From
What does the letter "T" in LPTSTR stand for?
:
archive
What does the letter "T" in LPTSTR stand for?
October 17th, 2006
The “T” in LPTSTR comes from the “T” in TCHAR. I don’t know for certain, but it seems pretty likely that it stands for “text”. By comparison, the “W” in WCHAR probably comes from the C language standard, where it stands for “wide”.