As you know, in visual studio 2010(c++) we have noset, unicode and MBCS character sets, and we can set it by menus or by preprocessor directive like #define _UNICODE. I\'m w
LPCTSTR is the pointer to TCHAR (string). It maps to either LPWSTR (wide char string) or LPCSTR (ansi string) depending if the _UNICODE
or UNICODE
defines were set. All of this TCHAR stuff was a holdover from the Windows 9x days when the earlier versions of Windows didn't have Unicode support in their APIs, but developers wanted to target compiling for both NT and 9x. All of this should be well deprecated by now.
My advice - get rid of all your TCHAR code and be explicit when using ANSI vs. UNICODE strings.
Convert all your project settings to Unicode.
Explicitly convert all LPTSTR, LPCTSTR, TCHAR, variables to be explicitly, LPWSTR, LPCWSTR, or WCHAR. Or when explicitly dealing with ANSI strings: LPSTR (char*), LPCSTR (const char*), or CHAR (char).
Be explicit when calling Win32 APIs. Use the "A" version of APIs when you want to process an ANSI string (e.g. CreateWindowA vs. CreateWindowW).
MultiByteToWideString and WideStringToMultiByte are your friends.