如题。~

解决方案 »

  1.   

    The TEXT macro identifies a string as Unicode when the UNICODE is defined during compilation. Otherwise, it identifies a string as an ANSI string. TEXT(
      LPTSTR string  // ANSI or Unicode string
    );
    Parameters
    string 
    Pointer to the string to be interpreted as either Unicode or ANSI. 
      

  2.   

    简单来说,就是在VS2008或者VS10里面使用的是Unicode,TEXT()只是把ANSI转化为VS可以识别的Unicode码,在VC06里面使用的是多字符集,所以不需要转化。
      

  3.   

    UNICODE宏  即 L"haha"
      

  4.   

    看看TEXT的宏定义 在winnt.h里
     
          #ifdef  UNICODE                     
    #define __TEXT(quote) L##quote      
    #else   /* UNICODE */               
    #define __TEXT(quote) quote         
    #endif /* UNICODE */                
    #define TEXT(quote) __TEXT(quote)   
     
    很明显,如果程序支持UNICODE则 则相当于 TEXT("haha") = L"haha" 宽字符版
    否则 就是 TEXT("haha") = "haha"