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

Hi all,

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


Who is Participating?
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
The font used by the control needs to support UNICODE.

See CreateFont and SetFont in help.

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
mahesh1402Connect With a Mentor Commented:
See this : KanjiFont : Display Chinese & Japanese characters on unicode & non-unicode systems

You may use ExtTextOutW or TextOutW etc. API functions in your Unicode project for 9x.

CongUanAuthor Commented:
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.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

>> 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

AndyAinscowFreelance programmer / ConsultantCommented:
I agree with maheseh - confusion.

Do you want to display UNICODE in your app or inside visual studio?
CongUanAuthor Commented:
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.
AndyAinscowFreelance programmer / ConsultantCommented:
So what exactly is the problem?
alkisgConnect With a Mentor Commented:
Get another resource editor that supports unicode. There are free alternatives (e.g. Visual Studio Express 2005).
AndyAinscowFreelance programmer / ConsultantCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.