0

I have software originally developed 20 years ago in Visual C++ using MFC with MBCS, and strings held in char[]. I am currently using VS2015.

To get it to work in Japanese I have:

1) change system locale and input method to Japan

2) In dialog editor change the dialog's font from MS Sans Serif to "Use System Font" which seems to set it to "MS Shell Dlg(8)" (whatever that is)

3) In LOGFONT I set the lfCharSet to DEFAULT_CHARSET

Questions:

1) in LOGFONT what do I set lfFaceName to? I tried Meiryo which works well with Japanese, but it doesn't work at all when I change everything to Korean.

2) In general, is what I am doing correct, taking to account it has to work in Korean, Chinese, Japanese etc.?

Sadly, converting to unicode is not an option..

Any help much appreciated! I have spent soo much time trying to work this out!

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
drb01
  • 189
  • 1
  • 2
  • 17
  • **MS Shell Dlg** is a special mapping font. Details about it can be found here: https://msdn.microsoft.com/en-us/library/windows/desktop/dd374112(v=vs.85).aspx – Andrew Truckle Nov 27 '16 at 15:45
  • Andrew is right, you can use "MS Shell Dlg" as the face name when creating a font. But you probably want to get the system dialog font to use for dialog boxes. See code at the bottom of [this long-winded answer](http://stackoverflow.com/questions/6057239/which-font-is-the-default-for-mfc-dialog-controls/6057761#6057761). Converting to Unicode is not at all difficult; it should be as simple as changing a few preprocessor definitions. But if you can't do that, you should be able to get away with doing what you're doing. The issue is that you are limited to a single ANSI code page. – Cody Gray - on strike Nov 27 '16 at 16:16
  • Thanks very much for your help, and interesting article. Everything seems to work fine with MS Shell Dlg. I tried MS Shell Dlg 2 as well, but the letters were too close, some of them even seemed to touch so I went with the older MS Shell Dlg in the end. – drb01 Dec 04 '16 at 08:36

0 Answers0