Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Edit Control-> show messages in all languages.

Posted on 2006-04-11
7
Medium Priority
?
198 Views
Last Modified: 2013-12-03
I need to enable a single Edit control to show messages from all the languages english, chinese, german, hindi etc, in other terms I wish to make edit control unicode enabled.
1. I create a unicode text(.txt) file, and enter characters from German language like "ÖÄß" etc, and few characters from hindi language "सवबहठ".
2. I read this file using CStdio class, and try to print these characters in my edit control, however i find that string shown on the edit control is "ÖÄß?????".

I tried changing the font of the edit ctrl for the current font for which the character belongs.
But this will make the string look like ÖÄß????? and then make it ???सवबहठ.
So I guess CEdit is of no help.
I tried CRichEdit Control. But this doesnt support unicode atall.
Can any one help?

What am I missing ? what could be done to make it work correctly. Do I need to find a font which supports all the languages in the world and assign this font to my edit control ?


Thanks in advance!
Regards
Suyash
0
Comment
Question by:gauravit_1
  • 2
4 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 16428679
refer this

"How to Display UNICODE Characters in a CListCtrl or a CEdit"

http://www.codeguru.com/cpp/cpp/cpp_mfc/general/article.php/c10285/

MAHESH
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 16429649
Most fonts really support all the languages in the world, you can see this in Character Map application. Just try Courier New for example.
Is your application Unicode? Maybe you loose information reading text file? Try to type inside Editbox in different languages - what result do you have?
0
 

Author Comment

by:gauravit_1
ID: 16435106
Thanks Mahesh,
However I needed unicode support for CRichEditCtrl.

Alex,
I tried CRichEdit Control. by default it doesn't support unicode.

l_pWnd->Create( _T( "RichEdit20W" ), NULL, in_dwStyle,
in_rcRect, in_pParentWnd, in_nID );

please note "RichEdit20W" which makes the CRichEditControl unicode enabled, by default its "RichEdit"
0
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 2000 total points
ID: 16435596
Here 'SendMessageW' is used for CRichEditCtrl

http://www.codeguru.com/Cpp/misc/misc/windowsmessaging/article.php/c10251/ <====

MAHESH
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

581 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