How can I convert from CString to std::wstring?
To convert CString to std::wstring:
CString hi("Hi");
std::wstring hi2(hi);
And to go the other way, use c_str():
std::wstring hi(L"Hi");
CString hi2(hi.c_str());
This should work as CString has operator LPCTSTR() defined:
CString s;
std::wstring s1 = s;