|
-
May 11th, 1999, 08:49 AM
#3
Re: Converting CString to wchar_t*
If you are just talking about putting a hard-coded value in there, it's easy.
wchar_t* wstr_name = L"Hello";
However I assume you want to move a CString variable's value into a wide string. One way to do this is to use the Unicode conversion macros that come with MFC and ATL. For example:
USES_CONVERSION;
CString str(_T("Hello"))
wchar_t* wstr_name = T2W(str.GetBuffer());
str.Release();
Joe O'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|