_wsetlocale(LC_ALL, L"chs");//chs应该是设置为中文吧。 wprintf(TEXT("%s\n"),Wstr); 宽字符转换成int _ttoi(XMLCstringToUnicodeCstring(pID->GetText()));