George Ginden wrote:

George Ginden ha scritto:

OK I'm trying to implement text alignment in the edit control.
Now, one question how do I know (in the EDIT_WM_NCCreate for example) if the text alignment has been requested by the programmer ?


Nevermind, I've figured it out. Now I need to set the "caret" position within the edit control...
Something which converts x,y coords to the column would be cool...
Eg: text is at x offset, and the cursor position should be updated as well...
EDIT_SetCaretPosition at x, y ...


Regards.

If you use "GetCharacterPlacement" (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_4l84.asp), you will get the following:
1. A list of pixel offsets for each character.
2. Caret position.
3. For future BiDi support - logical to visual mapping. I.e. - the next character logically is three characters down visually.


Please consider using it, so as my task (when I finally get to it, sigh) will be easier.

         Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/




Reply via email to