Solved

Drawing text in Middle-East languages

Posted on 2002-06-11
2
894 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Webinar: MongoDB® Index Types

Join Percona’s Senior Technical Services Engineer, Adamo Tonete as he presents “MongoDB Index Types, How, When and Where Should They be Used?” on Wednesday, July 12, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7).

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: 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…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

628 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