RICHED20: EM_CHARPOS fix

Krzysztof Foltman wdev at foltman.com
Sun Jun 18 15:21:23 CDT 2006


ChangeLog:
  * EM_CHARFROMPOS didn't work properly with scrolling (vertical 
scrollbar position was not taken into account)

Krzysztof
-------------- next part --------------
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 0ae347a..057e5d8 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -718,6 +718,7 @@ ME_CharFromPos(ME_TextEditor *editor, in
   GetClientRect(editor->hWnd, &rc);
   if (x < 0 || y < 0 || x >= rc.right || y >= rc.bottom)
     return -1;
+  y += ME_GetYScrollPos(editor);
   ME_FindPixelPos(editor, x, y, &cursor, NULL);
   return (ME_GetParagraph(cursor.pRun)->member.para.nCharOfs
           + cursor.pRun->member.run.nCharOfs + cursor.nOffset);


More information about the wine-patches mailing list