Re: stl::string to LPCWSTR
std::string is always a std::basic_string<char>. If you have a std::wstring you could use .c_str() to get a const wchar_t* (==LPCWSTR). It would be the easiest to use wstring everywhere. An alternative is to convert the const char*s to const wchar_t* using something like MultiByteToWideString.
Re: stl::string to LPCWSTR
Quote:
Originally Posted by Halsafar
I know my app has UNICODE on but I've read everywhere that VS2005 makes all appropriate changes automatically. So string is really typedef`d as wstring or something.
I really hope it doesn't. That would be a horrible violation of the standard.
I posted conversions between character sets here once. A search should turn them up.
Re: stl::string to LPCWSTR
I am not finding it...
Tried several searches and came up with to many pages of results to care to search through. None authored: CornedBee
Re: stl::string to LPCWSTR
Re: stl::string to LPCWSTR
Well isn't that irony. I had already asked this question and gotten a perfect answer from you.
Thanks for the help (twice over) and sorry for the trouble,
Halsafar