richedit: Use 32-bit rather than 16-bit trackbar value for scrolling.
This commit is contained in:
parent
ba01d15b1f
commit
f361910514
|
@ -4004,8 +4004,18 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
|
||||||
break;
|
break;
|
||||||
case SB_THUMBTRACK:
|
case SB_THUMBTRACK:
|
||||||
case SB_THUMBPOSITION:
|
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;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (msg == EM_SCROLL)
|
if (msg == EM_SCROLL)
|
||||||
return 0x00010000 | (((ME_GetYScrollPos(editor) - origNPos)/lineHeight) & 0xffff);
|
return 0x00010000 | (((ME_GetYScrollPos(editor) - origNPos)/lineHeight) & 0xffff);
|
||||||
|
|
Loading…
Reference in New Issue