Edit Control-> show messages in all languages.

Posted on 2006-04-11
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!
Question by:gauravit_1
    LVL 22

    Expert Comment

    refer this

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

    LVL 48

    Expert Comment

    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?

    Author Comment

    Thanks Mahesh,
    However I needed unicode support for CRichEditCtrl.

    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"
    LVL 22

    Accepted Solution

    Here 'SendMessageW' is used for CRichEditCtrl <====


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    repeatEnd java challenge 42 83
    how to monitor remote shell execution on linux 9 89
    centeredAverage challenge 8 92
    has22 challenge 11 56
    Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
    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.
    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…

    754 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

    17 Experts available now in Live!

    Get 1:1 Help Now