Module: wine Branch: master Commit: f36191051416977796e4ec2a7990e36d9a73df23 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f36191051416977796e4ec2a79...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Tue Jan 6 00:34:28 2009 -0500
richedit: Use 32-bit rather than 16-bit trackbar value for scrolling.
---
dlls/riched20/editor.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index abb9078..c7b8f40 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4004,8 +4004,18 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, break; case SB_THUMBTRACK: case SB_THUMBPOSITION: - ME_ScrollAbs(editor,HIWORD(wParam)); + { + SCROLLINFO sbi; + sbi.cbSize = sizeof(sbi); + sbi.fMask = SIF_TRACKPOS; + /* Try to get 32-bit track position value. */ + if (!GetScrollInfo(editor->hWnd, SB_VERT, &sbi)) + /* GetScrollInfo failed, settle for 16-bit value in wParam. */ + sbi.nTrackPos = HIWORD(wParam); + + ME_ScrollAbs(editor, sbi.nTrackPos); break; + } } if (msg == EM_SCROLL) return 0x00010000 | (((ME_GetYScrollPos(editor) - origNPos)/lineHeight) & 0xffff);