Solved

Drawing text in Middle-East languages

Posted on 2002-06-11
2
866 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

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

Suggested Solutions

Title # Comments Views Activity
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 377
deburging in oracle form 12 88
List out all word 7 257
Hibernate methods 2 68
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

26 Experts available now in Live!

Get 1:1 Help Now