CString转LPCWSTR

来源:互联网 发布:建一个淘宝白菜群佣金 编辑:程序博客网 时间:2024/05/01 22:57
<pre name="code" class="cpp">

CString转LPCWSTR:

//方法一 CString str=_T("TestStr"); USES_CONVERSION; LPWSTR pwStr=new wchar_t[str.GetLength()+1]; wcscpy(pwStr,T2W((LPCTSTR)str));



// 方法二  CString str=_T("TestStr"); USES_CONVERSION; LPCWSTR pwcStr = A2CW((LPCSTR)str); 


0 0
原创粉丝点击