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
, e.g. _T("abc")
may resolve to either "abc"
, or L"abc"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With