Solved

Drawing text in Middle-East languages

Posted on 2002-06-11
2
877 Views
Last Modified: 2013-11-20
Hi,
I have a CRichEditCtrl which operates as a text editor, and I need to display its content in an owner-drawn button. I am using CDC::DrawText in order to draw the text on the button (after getting the text from the CRichEditCtrl). Everything works fine accept in some cases when I write hebrew on the CRichEditCtrl.
If I write a number followed by "." and a hebrew character, the text that displayed on the owner-drawn button is opposite. I found a drawing style in DrawText method "DT_RTLREADING"(Right-To-Left reading), and this solved the case I mentioned above, but now when I write english text (something like "1.w") I get it opposite.
I thought to parse the string before drawing it, and use the DT_RTLREADING style only if I found a hebrew character in the string, but this is not good enough because if the string contains hebrew and english characters with "." and numbers, then the button does not display the text correctly (not with the DT_RTLREADING style and not without it).

Can someone please help ???
thanks,
Yoav.


0
Comment
Question by:yoavo
  • 2
2 Comments
 

Expert Comment

by:ICR
ID: 7070980
Hi,
This is just a guess, but how about trying to draw the text on the button letter by letter, each with it's own style?
Good luck, hope this would help
0
 

Accepted Solution

by:
ICR earned 120 total points
ID: 7072019
Or, if this doesn't work, how about trying to get text in sequences of hebrew and english and then drawing each one in its' own style.For example, the following string:
"1.wwwààà" would be drawn as:
1. "1.www"
2. "ààà"
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 99
List out all word 7 317
Thin secure Windows 10 5 102
How do I get Window Title of all opened process? 4 13
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 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