We recently upgraded from VC6.0 to VS2005, and now we have problems with the
japanese version of our programs.
In some edit boxes and editable combo boxes it's not possible to show
japanese characters.
Amazingly the drop down part of the combo box displayes the japanese text
ok, but if you select this text it isn't correct in the edit part.
After debugging I narrowed it down to a problem with resource files.
We only have this problems in dialogs where we changed the default font.
We changed the standard line
FONT 8, "MS Shell Dlg", 0, 0, 0x1
to
FONT 10, "MS Sans Serif", 0, 0, 0x1
If we now change this line to
FONT 10, "MS Sans Serif", 0, 0, 0x80
(japanese character set) everything works as it should.
But as we have a huge amount of resource files and as it would mean a lot of
error-prone work, each time we get a new japanese translation, I want to
know if it is possible to set something like a flag for the new MFC (7.1) to
behave like the old one (4.2)?
TIA
--
Michael Reim
Michael DOT Reim AT helmut-fischer DOT de
You will also want to run the actual dialogs on a machine with Japanese
Windows loaded or at least a MUI since the dialogs often display differently
in real life than they do in the resource editor.
Tom
"Michael Reim"
<nospammich...@REMOVENOSPAMANDCAPShelmut-fischer.denospam> wrote in
message news:%23HbzPt6...@TK2MSFTNGP02.phx.gbl...
Font size 8 wasn't a good choice of course. Best would be to get the user's
font size settings, which default to 9 unless the user has changed it. 10
is usually readable though.
Also you need to run the actual dialogs on an a machine that actually uses
the target language version of Windows (Japanese in this case). If there's
any chance that a program will be used by an end user in an MUI version,
then you need to test the actual dialogs in both the actual target language
version and the MUI version. The two versions are not bug-for-bug
compatible. MUI is convenient for some end users, but it's not at all
convenient for developers.
"Tom Serface" <tom.n...@camaswood.com> wrote in message
news:32CBC683-20B2-4373...@microsoft.com...
After reading more about this topic, this is exactly the way we are going to
do it.
We change all occurences of "MS Sans Serif" to "MS Shell Dlg".
Unfortunatly there is a little caveat, that we have sources that have to be
compatible with WindowsCE 4.2 and 5.0.
So we have to duplicate these. Not nice, but it works.
BTW: selecting "MS Shell Dlg" doesn't seem to be possible in resource
editor.
--
Michael Reim
Michael DOT Reim AT helmut-fischer DOT de
"Tom Serface" <tom.n...@camaswood.com> schrieb im Newsbeitrag
news:32CBC683-20B2-4373...@microsoft.com...
Changing MS Sans Serif to MS Shell Dlg seems to do the trick.
>I wonder what the reason was for switching from MS Shell Dlg to MS Sans
>Serif.
We didn't switch, Microsoft did. In VC6.0 the default was MS Sans Serif, in
Visual Studio 2005 the default is MS Shell Dlg. Furthermore the old MFC
automatically replaced MS Sans Serif with DEFAULT_GUI_FONT, the new MFC does
the same for MS Shell Dlg only. So all resources generated with VC6.0 now
behave differently with the new MFC.
> Microsoft says that MS Shell Dlg is designed to work on every user's
> Windows language version as long as the developer is using English-US
> Windows with their compiler.
I did some tests and MS Shell Dlg seems to work the same way as MS Sans
Serif did with the old MFC.
> Also you need to run the actual dialogs on an a machine that actually uses
> the target language version of Windows (Japanese in this case). If
> there's any chance that a program will be used by an end user in an MUI
> version, then you need to test the actual dialogs in both the actual
> target language version and the MUI version. The two versions are not
> bug-for-bug compatible. MUI is convenient for some end users, but it's
> not at all convenient for developers.
Of course you are right, it's always a good choice to test the program on
the target system.
Thank you for your help.
Tom
"Michael Reim"
<nospammich...@REMOVENOSPAMANDCAPShelmut-fischer.denospam> wrote in
message news:%230SneQ5...@TK2MSFTNGP03.phx.gbl...
Tom
"Michael Reim"
<nospammich...@REMOVENOSPAMANDCAPShelmut-fischer.denospam> wrote in
message news:%230SneQ5...@TK2MSFTNGP03.phx.gbl...
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Doesn't WinXP (and perhaps Vista?) use "MS Shell Dlg 2" to get Tahoma
instead of MS Sans Serif?
-- David
"Yes" for XP (but there is nothing in VS to allow that)
And "No" for Vista (MS renounced the "MS Shell Dlg X" idea)
In VS 2005 - resource editor - dialog properties you have a font selection
field (with a '...' button that opens the standard font selection dialog).
It is not possible to select "MS Shell Dlg" from there (because that only
shows *real fonts*, and "MS Shell Dlg" is not a real font)
But you also have a boolean field called "Use System Font"
Set that to True and it will reset the font to "MS Shell Dlg"
Thanks Mihai. It does seem difficult to use MS Shell Dlg 2 for XP and
something else for Vista, although as David W pointed out, this is hard
anyway due to the Segoe UI (default Vista font) being smaller and thus the
entire dialog layout changes.
-- David
Tom
"Mihai N." <nmihai_y...@yahoo.com> wrote in message
news:Xns99E130C...@207.46.248.16...
Actually the problem is the opposite. It's hard anyway due to Meiryo (half
default Vista font) being bigger and thus half of the entire dialog layout
changes.
In lots and lots of built-in dialogs in Vista, there's a combination of
Meiryo (fat antialiased characters) and MS UI Gothic (thinner
non-antialiased characters that users have been accustomed to for the past
10 years). I don't quite have any opinion about whether Meiryo is better
because I like antialiasing but don't like wasting real estate in the
screen. I do have an opinion about lots and lots of built-in dialogs in
Vista; the combination of antialiased and non-antialiased fonts is very
jarring visually and hard to read. Microsoft has assured me that this will
not be fixed.
Kind of weird.
MS Sans Serif is a bitmap font (.FON), I doubt is has Japanese in it.
On my XP that is mapped to SSERIFE.FON
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts)
Microsoft Sans Serif is not a real font, it linked to Japanese fonts
in XP (see HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontLink\SystemLink)
Windows XP (compared to 2000) has a lot of improvements when it comes to
font linking/mapping/fallback/substitution/youNameIt, so that it is almost
difficult to show squares :-)
So I don't see how just copying a bitmap font to 2000 can improve things.
Tom
"Mihai N." <nmihai_y...@yahoo.com> wrote in message
news:Xns99E1D3F6...@207.46.248.16...
Ok. But this also does not work ok on 2000 (there is no MS Gothic UI, only MS
Gothic).
And another trouble with 2000: MS Gothic has an English name and a
Japanese name. And the font is recognized by one name only, matching the
system locale. If the system locale is Japanese, you see the Japanese name,
otherwise you see the English one. So no matter what name you use in the
resources (Jp or En), it is guaranteed to fail in some cases.
In improvement in Win XP is that the fonts are recognized no matter
if you use the localized name or the English name.
MS Gothic and MS P Gothic existed in Windows NT4 RTM and probably earlier.
MS Gothic and MS P Gothic and MS UI Gothic came in with Windows NT4 SP4,
breaking MS Word 97 and MS Word 98.
Windows 2000 preserved the collection of three fonts and preserved the
breakage of Word 97 and 98 (except that the US version of Windows 2000
received a fix during beta testing so that Japanese Word 97 and 98 work on
US Windows 2000 while breaking on Japanese Windows 2000).
Thanks!, SX
Since we use "MS Shell Dlg" we have no problems anymore.
HTH
--
Michael Reim
Michael DOT Reim AT helmut-fischer DOT de
"SX" <S...@discussions.microsoft.com> schrieb im Newsbeitrag
news:DD8FCA09-2A01-46E2...@microsoft.com...
Regards, Stevan