MultiByteToWideChar (Char*turn Unicode)Chartext[ the] = {0}; Chartext1[ the] = {0}; intI=0; Getdlgitemtexta ( This->m_hwnd,idc_edit1,text, the); intj=strlen (text); while(j) {Text1[i]= text[j-1]; I++; J--; } intLen = MultiByteToWideChar (CP_ACP,0, Text1,-1Null0); TCHAR* Text2 =NewTCHAR [Len]; MultiByteToWideChar (CP_ACP,0, Text1,-1, Text2, Len); SETDLGITEMTEXTW (IDC_TEXTOUT,TEXT2); //setdlgitemtexta (THIS->M_HWND,IDC_TEXTOUT,TEXT1);delete []text2;
WideCharToMultiByte (Unicode to char *) WCHAR text[ the] = {0}; WCHAR text1[ the] = {0}; intI=0; GETDLGITEMTEXTW (Idc_edit1,text, the); intj=wcslen (text); while(j) {Text1[i]= text[j-1]; I++; J--; } intLen = WideCharToMultiByte (cp_acp,null,text1,-1Null0, Null,false); Char* Text2 =New Char[Len]; memset (Text2,0, Len); WideCharToMultiByte (Cp_acp,null,text1,-1, Text2,len,null,false); Setdlgitemtexta ( This-m_hwnd,idc_textout,text2); delete []text2;
Windows core Programming essay