Solved

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

Posted on 2006-11-15
12
405 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 54
How do you programatically show and hide the Windows 10 On-Screen-Keyboard? 3 663
format the code in java 6 93
canBalance challenge 34 84
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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