May 19th, 2009, 06:49 AM
convert CString to const wchar_t *.
Hi all please tell me how can i convert CString to const wchar_t *.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
May 19th, 2009, 07:00 AM
Re: convert CString to const wchar_t *.
If you compile in Unicode mode, your CStrings will be wide, and you can use the standard cast operator:
In 8-bit MBCS mode you can declare a wide CString as CString<wchar_t>.
CString cs(L"Hello world");
If you have an 8-bit CString you can use the conversion macros USES_CONVERSION and A2W() to convert the contents to wide characters.
Or use a _bstr_t variable, which is a dual-mode string.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!