Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Drawing text in Middle-East languages

Posted on 2002-06-11
2
Medium Priority
?
905 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 360 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Screencast - Getting to Know the Pipeline

916 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