What is _T("")?
What is _T("")?
According to a quick search via MSDN,
Just did a little bit more research, apparently it is equivalent to the _TEXT macro.[/edit]_T is a macro to expand the string literal to support Unicode.
Mark Oliver, MSMFC, 8/1/95
Last edited by hk_mp5kpdw; 07-17-2002 at 01:00 PM.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
Thanks; is _TEXT only used with UNICODE? Otherwise, isn't it the same as " "?
No. The effect of TEXT("") _TEXT("") _T("") all depend of if Unicode is defined in your source. The use of these macros allow you to compile a unicode/non-unicode version of your source. This is useful because Windows9x don't support unicode, while Win2K and NT are nativly unicode. You also have to remember to use the generic string manipulation functions instead of the str*(); type. I suggest reading the chapter on unicode in Charles Petzolds book, you can download it off of my FTP if you like.
whats unicode, i see a lot of talk about it. but im not to sure.i think it involves some unix stuff or something
Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: email@example.com
-the shroom has spoken
Unicode is a character set. ASCII is also a character set. Just to keep things very simple, Unicode is a bigger character set. A Unicode character is 16bits opposed to the 8bits an ASCII character takes up. Windows runs in unicode natively so it is recommended to use unicode as much as possible. I don't but then again who is perfect?
Just to explain master5001 more, the ASCII character set only contains western language characters, such as english, spanish, french. It does not include langages from the east such as chineis, japanes, korean, ect.
Unicode has both Eastern and Western character sets.
I shall call egypt the harmless dragon
like if you go to Start->Programs->Accecories->...->Character Map
and you look under fonts that support korean or japanese characters, and you try to copy and paste them into a post in the cboard, they will appear as question marks because the cboard, or any website(i might be wrong) doesn't support unicode.
for example, this is the greek symbol sigma:
?(i copied and pasted it from the character map)
hope this helps