Fix for listview wheelmouse message handling.

This commit is contained in:
Rein Klazes 2002-10-29 23:08:33 +00:00 committed by Alexandre Julliard
parent de41ddcab9
commit d9310e76c4
1 changed files with 5 additions and 11 deletions

View File

@ -7325,22 +7325,16 @@ static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta)
* listview should be scrolled by a multiple of 37 dependently on its dimension or its visible item number
* should be fixed in the future.
*/
if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo))
LISTVIEW_VScroll(infoPtr, SB_THUMBPOSITION,
scrollInfo.nPos + (gcWheelDelta < 0) ?
LISTVIEW_SCROLL_ICON_LINE_SIZE :
-LISTVIEW_SCROLL_ICON_LINE_SIZE, 0);
LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (gcWheelDelta < 0) ?
LISTVIEW_SCROLL_ICON_LINE_SIZE : -LISTVIEW_SCROLL_ICON_LINE_SIZE, 0);
break;
case LVS_REPORT:
if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines)
{
if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo))
{
int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
cLineScroll *= (gcWheelDelta / WHEEL_DELTA);
LISTVIEW_VScroll(infoPtr, SB_THUMBPOSITION, scrollInfo.nPos + cLineScroll, 0);
}
int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines);
cLineScroll *= (gcWheelDelta / WHEEL_DELTA);
LISTVIEW_VScroll(infoPtr, SB_INTERNAL, cLineScroll, 0);
}
break;