Hi,
How do you write chinese in windows (in the .rc) using Win32 APIs? Also, how do you allow users to type in chinese in EDITTEXT and also how to store it? If it somehow matters, I'm developing using Dev-C++.
Thanks in advance.
Hi,
How do you write chinese in windows (in the .rc) using Win32 APIs? Also, how do you allow users to type in chinese in EDITTEXT and also how to store it? If it somehow matters, I'm developing using Dev-C++.
Thanks in advance.
Unicode, but you and they have to have the Chinese simplified and/or Chinese traditional language pack installed.
http://www.microsoft.com/downloads/d...displaylang=en
Last edited by abachler; 08-10-2009 at 05:30 AM.
How do I use unicode? And does that mean if I can read chinese on my computer then it'll be fine, or do you mean some other packages?
Thanks.
If you can read it on your computer, then you already have the language pack installed. Just type the Chinese into the resource file as normal. I'm not sure GCC has an actual RC application, I think it just uses a simple text editor which of course may not work with Unicode.
Refer to these articles on MSDN which explains it better than I can.
Using Unicode Data
http://msdn.microsoft.com/en-us/library/cc194800.aspx
http://msdn.microsoft.com/en-us/library/cc194801.aspx
http://msdn.microsoft.com/en-us/library/cc194795.aspx
http://msdn.microsoft.com/en-us/library/cc194799.aspx
Last edited by abachler; 08-10-2009 at 06:01 AM.
But do I have to type in any commands before using unicode, like if I want to put something like this:
in my dialog, how do I do it? I tried just writing chinese there and compile it, but it just shows 2 characters like in the IDE.Code:LTEXT "Some Chinese here", ID, 1, 1, 1, 1
You also have to use the Unicode versions of functions.
May or may not display correctly, depending on your project settings.Code:MessageBox(NULL , TEXT("Some Chinese Here.") , TEXT("Some More Chinese Here.") , MB_OK);
Will definitely NOT display properly, as you are using Unicode in an ANSII function callCode:MessageBoxA(NULL , TEXT("Some Chinese Here.") , TEXT("Some More Chinese Here.") , MB_OK);
Will properly display the ChineseCode:MessageBoxW(NULL , TEXT("Some Chinese Here.") , TEXT("Some More Chinese Here.") , MB_OK);
Last edited by abachler; 08-10-2009 at 06:09 AM.
What about dialogs declared in .rc? Something like LTEXTW?
Thanks.