easy way to convert between UNICODE <-> ANSI (wchar_t* <-> char*);->->
simply use CStringA & CStringW;
>>
char* char_ansi="ansi";
CStringA cs_ansi(char_ansi);
wchar_t* char_unicode=_T("unicode");
CStringW cs_unicode(char_unicode);
than run function below.
CStringA Utility::convertCStringW2A (CStringW wString)
{
CStringA aString = CW2A (wString);
return aString;
}
CStringW Utility::convertCStringA2W(CStringA aString)
{
CStringW wString = CA2W(aString);
return wString;
}
沒有留言:
張貼留言