Solved

Display text with Unicode format on controls written by VC6.0

Posted on 2006-11-15
12
410 Views
Last Modified: 2013-11-20
Hi all,

We can write a project with Debug-Unicode mode and display text with Unicode format? Ex: Chinese or Japanese

Idea?

Thanks.
0
Comment
Question by:CongUan
  • 4
  • 2
  • 2
  • +1
12 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 168 total points
ID: 17946545
The font used by the control needs to support UNICODE.

See CreateFont and SetFont in help.

roughly
In Header file
CFont m_MyUnicodeFont;

in .cpp file
m_MyyUnicodeFont.CretaeFont(....);  // eg in constructor

GetDlgItem(IDC_MY_CONTROL)->SetFont(&m_MyUnicodeFont);  //after the window has been created, eg OnInitDialog
0
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 166 total points
ID: 17947157
See this : KanjiFont : Display Chinese & Japanese characters on unicode & non-unicode systems
http://www.codeproject.com/gdi/kanjifont.asp

You may use ExtTextOutW or TextOutW etc. API functions in your Unicode project for 9x.
http://support.microsoft.com/kb/210341

-MAHESH
0
 

Author Comment

by:CongUan
ID: 17954680
my problem is that i can't modify text with Unicode format on editor of VC, and i am finding a way to load Unicode text from a file, but now i dn't find.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 22

Expert Comment

by:mahesh1402
ID: 17954724
>> am finding a way to load Unicode text from a file
 
I am not sure.... confused from your explanation...

Are you looking for loading unicode files like : http://www.codeproject.com/file/ANSI-UNICODE_conversion.asp
OR : http://www.codeproject.com/file/utf16.asp

-MAHESH
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 17954736
I agree with maheseh - confusion.


Do you want to display UNICODE in your app or inside visual studio?
0
 

Author Comment

by:CongUan
ID: 17955070
VC Editor dn't support Unicode text. So we can't write Unicode text directly on Dialog resource of our project. We must load Unicode text from file, set those text to controls on runtime.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 17955144
So what exactly is the problem?
0
 
LVL 9

Assisted Solution

by:alkisg
alkisg earned 166 total points
ID: 17963651
Get another resource editor that supports unicode. There are free alternatives (e.g. Visual Studio Express 2005).
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 18372971
split
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
cat dog challenge 18 127
How do you programatically show and hide the Windows 10 On-Screen-Keyboard? 3 802
matchUp  challenge 9 115
scoreUp challenge 14 64
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question