In Windows Mobile and Windows, the string is Unicode. Therefore, when developing native code, pay special attention to String Conversion. Below is a simple String Conversion method. Record it for search.
Char Sza [ 100 ]; // ANSI
Wchar SZW [ 200 ]; // Unicode
// regular call of sprintf: all strings are in ANSI
sprintf (sza, " % S " , " ansi str " );
// convert string from Unicode into ANSI
sprintf (sza, " % S " , " Unicode STR " );
// regular call swprintf. all string are in Unicode
swprintf (SZW, L " % S " , L " Unicode STR " );
//Convert string from ANSI into Unicode
Swprintf (SZW, l"% S","ANSI Str");
code highlighting produced by actipro codehighlighter (freeware)
http://www.CodeHighlighter.com/
--> // convert cstring (UNICODE) to STD :: string
cstring STR = " Mel " ;
STD: string city = ct2ca (STR);
//Convert STD: string to cstring (UNICODE)
STD ::StringStr= "AA";
Cstring CSTR=Ccombstr (STR );
For more information, see
This article clarifies the character sets of Windows Mobile and Windows WinCE (Windows Embedded CE ).