It is more effecient to convert CString
to std::string
using the conversion where the length is specified.
CString someStr("Hello how are you");
std::string std(somStr, someStr.GetLength());
In tight loop this makes a significant performance improvement.