I already built wxWidgets libraries for Debug, Release, and Unicode - Release.
I modified the last function of the Hello World program to:
Code: Select all
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wchar_t s[] = L"言語";
int bufferSize = WideCharToMultiByte(CP_UTF8, 0, s, -1, NULL, 0, NULL, NULL);
char* m = new char[bufferSize];
WideCharToMultiByte(CP_UTF8, 0, s, -1, m, bufferSize, NULL, NULL);
wxMessageBox(_T(m),
_T("About Hello World"), wxOK | wxICON_INFORMATION, this);
}
It compiles fine, but the text comes out garbled when I click File->About
Why?