Krzysztof Foltman : riched20: EM_CHARFROMPOS didn' t work properly with scrolling

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 19 03:35:37 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 8e852101447eb60aa4ed361f863306cc3e076b96
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=8e852101447eb60aa4ed361f863306cc3e076b96

Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Sun Jun 18 22:21:23 2006 +0200

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

---

 dlls/riched20/caret.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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-cvs mailing list