Re: MFC(VC6) Application Localization from French to Chinese(RPC)
- From: kewei <KeweiShang@xxxxxxxxx>
- Date: Tue, 1 Jul 2008 08:15:25 -0700 (PDT)
On May 28, 3:45 pm, "Tom Serface" <tom.nos...@xxxxxxxxxxxxx> wrote:
Yes those kinds of problems are often maddening since they can happen in so
many ways and that's the reason many people are just going to Unicode for
multi-language applications. I didn't think you could do a Unicode .RC file
with VC6, but it could be that the data is getting corrupted even before
your program runs. I remember in VC6 if I were to ever edit any of the
Asian content without first switching to the Asian code page the whole file
would get messed up. There maybe another library function in MFC too that
is reading your data as ANSI. You could trace through in the debugger to
get to the button routine and see what actual string is being assigned.
Tom
"kewei" <KeweiSh...@xxxxxxxxx> wrote in message
news:764b8d39-3f3a-493d-b227-ba30efc29fb1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am using VC6.
and I "have theChinesecode page loaded for the characters to work
correctly." by setting the control panel. I am quite sure I did this
step accurately. I even tried the application in Chinese OS.
Actually, the application i am in charge of in non-unicode, but
the .rc file is saved in unicode I believe.
Actually, as far as I know. of course, a .lib file can't not
contain .rc, but actually, the application add the .rc as an external
dependencies, so the application can use the .rc file and .lib, that's
what my company did and it was working well with other language, like
german, english, french.
The thing that is wired is that, even in the same dialog, some of the
static strings or buttons show in "??" or messy form, but some other
static string or buttons shows successfully in Chinese form.
It's in the same dialog...!
So I couldn't understand why.
I solved this problem finally.
Actually, the reason is because I am using mutiple .rc files in one
project.
So for the First .rc file, the Chinese character surely displayed
correctly, but for the 2nd, 3rd... .rc files, the vc compile them not
as Chinese codepage(936) but as French codepage(1252).
My solution for this is that, for the project that cannot displayed
chinese correctly, click "view" -> "resource includes", and set the
language as well as the codepage for the next .rc file as following:
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE 4, 2
#pragma code_page(936)
#endif //_WIN32
#include "l.chs\afxres.rc" // Standard components
#include "l.chs\afxprint.rc" // printing/print preview
resources
#include "2ndResource.rc"
#include "3rdResource.rc"
#endif
this part of code will be written at the end of .rc file of this
project, consequently, it's also working on the 2ndResource.rc.
but you will find still, the Chinese Character in the 3rdResource.rc
display like "??".
So you could change the "view" -> "resource includes" for the
2ndResource.rc in the same way.
.
- Prev by Date: Re: Book recommendations
- Next by Date: Re: how to store list of varying types
- Previous by thread: Problem with ExitInstance
- Next by thread: strange behavior using CWinThread
- Index(es):
Loading