From c9b6534154b84a9bf0739b6bd6523d7c51db97ab Mon Sep 17 00:00:00 2001 From: Gerard Patel Date: Sun, 24 Jan 1999 18:57:23 +0000 Subject: [PATCH] Changed EDIT_EM_CharFromPos to return line number. --- controls/edit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controls/edit.c b/controls/edit.c index d9ccbba148e..e6b3c01430b 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -1888,8 +1888,9 @@ static INT32 EDIT_WordBreakProc(LPSTR s, INT32 index, INT32 count, INT32 action) * * EM_CHARFROMPOS * - * FIXME: do the specs mean to return LineIndex or LineNumber ??? - * Let's assume LineIndex is meant + * returns line number (not index) in high-order word of result. + * NB : Q137805 is unclear about this. POINT * pointer in lParam apply + * to Richedit, not to the edit control. Original documentation is valid. * FIXME: do the specs mean to return -1 if outside client area or * if outside formatting rectangle ??? * @@ -1907,8 +1908,7 @@ static LRESULT EDIT_EM_CharFromPos(WND *wnd, EDITSTATE *es, INT32 x, INT32 y) return -1; index = EDIT_CharFromPos(wnd, es, x, y, NULL); - return MAKELONG(index, EDIT_EM_LineIndex(wnd, es, - EDIT_EM_LineFromChar(wnd, es, index))); + return MAKELONG(index, EDIT_EM_LineFromChar(wnd, es, index)); }