A simple grep of the SDK shows us that the answer is that it doesn't matter—they are the same. They both turn into __T(x)
.
C:...Visual Studio 8VC>findstr /spin /c:"#define _T(" *.h
crtsrcchar.h:2439:#define _T(x) __T(x)
includechar.h:2390:#define _T(x) __T(x)
C:...Visual Studio 8VC>findstr /spin /c:"#define _TEXT(" *.h
crtsrcchar.h:2440:#define _TEXT(x) __T(x)
includechar.h:2391:#define _TEXT(x) __T(x)
And for completeness:
C:...Visual Studio 8VC>findstr /spin /c:"#define __T(" *.h
crtsrcchar.h:210:#define __T(x) L ## x
crtsrcchar.h:889:#define __T(x) x
includechar.h:210:#define __T(x) L ## x
includechar.h:858:#define __T(x) x
However, technically, for C++ you should be using TEXT()
instead of _TEXT()
, but it (eventually) expands to the same thing too.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…