thank you 

解决方案 »

  1.   

    CString tt="test";
    LPBYTE ttt=(LPBYTE)(LPTSTR)(LPCTSTR)tt;
      

  2.   

    CString tt="test";
    LPBYTE ttt=(LPBYTE)(LPTSTR)(LPCTSTR)tt;
    MessageBox(((const char*)ttt));
      

  3.   

    CString::GetBuffer
    Returns a pointer to the internal character buffer for the CString object. The returned LPTSTR is not const and thus allows direct modification of CString contents.If you use the pointer returned by GetBuffer to change the string contents, you must call ReleaseBuffer before using any other CString member functions.