mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 16:51:39 +00:00
[USER32] Fixed scrolling by mouse wheel issue
This commit is contained in:
parent
a4483d79da
commit
d0a6727637
1 changed files with 13 additions and 8 deletions
|
@ -321,14 +321,15 @@ static LRESULT LISTBOX_SetTopItem( LB_DESCR *descr, INT index, BOOL scroll )
|
|||
}
|
||||
else
|
||||
diff = (descr->top_item - index) * descr->item_height;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
if (descr->style & LBS_MULTICOLUMN)
|
||||
ScrollWindowEx(descr->self, diff, 0, NULL, NULL, 0, NULL,
|
||||
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN);
|
||||
else
|
||||
#endif
|
||||
ScrollWindowEx(descr->self, 0, diff, NULL, NULL, 0, NULL,
|
||||
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN);
|
||||
ScrollWindowEx( descr->self, 0, diff, NULL, NULL, 0, NULL,
|
||||
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
|
||||
}
|
||||
else
|
||||
InvalidateRect( descr->self, NULL, TRUE );
|
||||
|
@ -2034,6 +2035,10 @@ static LRESULT LISTBOX_HandleMouseWheel(LB_DESCR *descr, SHORT delta )
|
|||
pulScrollLines = min((UINT) descr->page_size, pulScrollLines);
|
||||
cLineScroll = pulScrollLines * (float)descr->wheel_remain / WHEEL_DELTA;
|
||||
descr->wheel_remain -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines;
|
||||
#ifdef __REACTOS__
|
||||
if (cLineScroll < 0)
|
||||
cLineScroll -= descr->page_size;
|
||||
#endif
|
||||
LISTBOX_SetTopItem( descr, descr->top_item - cLineScroll, TRUE );
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue