I was looking at some windows directx application code and saw that they use the macro _T(x) to set their window name, when looking at the macro definiton I saw this
#define _T(x) __T(x)
then I followed and looked at __T
#define __T(x) x
Why does this exist?
_T(x)
is usually a macro for a platform agnostic text character type. In some platforms it may resolve to just x
. In others using wide characters it may resolve to L ## x
, eg _T("abc")
may resolve to either "abc"
, or L"abc"
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.