星期三, 9月 16, 2009

The differences between L"Text", _T("Text") and TEXT("Text")

The differences between L"Text", _T("Text") and TEXT("Text"):
  • _T("Text") and TEXT("Text") is a narrow-character (ASCII) literal in an ANSI build but a wide character (UNICODE) literal in a Unicode build.
  • L"Text" is always a wide-character literal, regardless of pre-processor definitions.
  • _T() and TEXT() are macros, the L prefix is part of the core C and C++ language lexical structure.
  • There is no difference between _T() and TEXT(), both macro do same thing, only difference is _T() defines in tchar.h and TEXT() defines in windows.h.


沒有留言: