Solved

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

Posted on 2006-11-15
12
395 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now