Thank you Microsoft for correcting the EM_CHARFROMPOS

J

Jon K.

But there is still some corrections to do:

You are assuming that a text starting with RTL chars is an RTL text,
that may be wrong.

The RTL should take in account the control's RightToLeft property.

Try this:

Set the RightToLeft property of a text box to RightToLeft.No

Write some RTL text in a text box and press the Enter key.

Get the EM_CHARFROMPOS for the last line, you will find that X is
the previous line Size that is wrong, it should return X = left margin.



Thank you for developing a system that supports the whole world's scripts.

I doubt that any thing is unclear in this post, anyway I can answer any
questions you may wish to ask if I know the answer.

JK
 
J

Jon K.

After reviewing the test application, I've found that all errors are a
result of EM_POSFROMCHAR returning 0xffffffff for a char index greater
than the last char index. This is not the MSDN documented behaviour.

I am trying to adjust the code to this misleading behaviour.



JK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top