char*->TCHAR*
char *ansii_string = "some text"; int size = strlen(ansii_string); TCHAR unicode_string[30]; mbstowcs(unicode_string, ansii_string, size+1); |
TCHAR*->char*
TCHAR* unicode_string=_T("unicode string"); int size= wcslen(unicode_string); char ansi_string[30]; wcstombs(ansi_string, unicode_string, size+1); |
wxString->char*
wxString wx_string=_T("wx string"); char ansi_string[30]; strcpy(ansi_string,wx_string.mb_str()); |
char*->wxString
char *ansii_string = "some text"; wxString wx_string(ansii_string,wxConvUTF8); |
wxString->TCHAR*
wxString wx_string=_T("wx string"); TCHAR wchar_string[30]; wcscpy(wchar_string,wx_string.wc_str()); |
TCHAR*->wxString
TCHAR *tchar_string = _T("some text");
wxString wx_string(tchar_string,wxConvUTF8);
沒有留言:
張貼留言