Reputation: 319
I was making a program that could display different languages once pressed, but when it came to making the LPSTR in my menu to display the Japanese option, it wouldn't display the Japanese characters. It just displayed "???".
Here is a screenshot of my program:
Here is the code that doesn't work:
I tried this:
AppendMenu(win32LANGUAGE,MF_STRING,NULL,"日本人");
and this:
wchar_t jap = "日本人";
AppendMenu(win32LANGUAGE,MF_STRING,NULL,(LPSTR)jap);
I am stuck. I don't know why it won't display the Japanese characters. Thanks in advance.
Upvotes: 0
Views: 285
Reputation: 21040
If your compiler doesn't throw an error on AppendMenu then you probably haven't defined the UNICODE
macro, try using AppendMenuW
, set jap
(which should be a wchar_t const*
) to L"日本語"
, and don't cast it.
Upvotes: 2