Solved

Drawing text in Middle-East languages

Posted on 2002-06-11
2
863 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

7 Experts available now in Live!

Get 1:1 Help Now