https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a4483d79dabf0806b8057…
commit a4483d79dabf0806b80579d476b1a29284e5fe96
Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com>
AuthorDate: Mon Dec 16 00:49:49 2019 +0000
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Apr 30 18:58:20 2020 +0200
[USER32] Fixed scrolling issue in Change Icon dialog. CORE-16163
---
win32ss/user/user32/controls/listbox.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/win32ss/user/user32/controls/listbox.c
b/win32ss/user/user32/controls/listbox.c
index 4e1b48a3a72..21d052bf4be 100644
--- a/win32ss/user/user32/controls/listbox.c
+++ b/win32ss/user/user32/controls/listbox.c
@@ -21,7 +21,7 @@
*
* This code was audited for completeness against the documented features
* of Comctl32.dll version 6.0 on Oct. 9, 2004, by Dimitrie O. Paun.
- *
+ *
* Unless otherwise noted, we believe this code to be complete, as per
* the specification mentioned above.
* If you discover missing features, or bugs, please note them below.
@@ -321,9 +321,14 @@ static LRESULT LISTBOX_SetTopItem( LB_DESCR *descr, INT index, BOOL
scroll )
}
else
diff = (descr->top_item - index) * descr->item_height;
-
- ScrollWindowEx( descr->self, 0, diff, NULL, NULL, 0, NULL,
- SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
+#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);
}
else
InvalidateRect( descr->self, NULL, TRUE );
@@ -512,7 +517,7 @@ static INT LISTBOX_GetItemFromPoint( const LB_DESCR *descr, INT x, INT
y )
*
* Paint an item.
*/
-static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
+static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
INT index, UINT action, BOOL ignoreFocus )
{
LB_ITEMDATA *item = NULL;
@@ -1070,7 +1075,7 @@ static LRESULT LISTBOX_Paint( LB_DESCR *descr, HDC hdc )
/* keep the focus rect, to paint the focus item after */
if (i == descr->focus_item)
focusRect = rect;
-
+
LISTBOX_PaintItem( descr, hdc, &rect, i, ODA_DRAWENTIRE, TRUE );
rect.top = rect.bottom;
@@ -2621,8 +2626,8 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
return 0;
}
}
- }
-#endif
+ }
+#endif
if (!descr)
{
@@ -3137,7 +3142,7 @@ LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
LISTBOX_HandleMouseMove( descr, mousePos.x, mousePos.y);
descr->captured = captured;
- }
+ }
else if (GetCapture() == descr->self)
{
LISTBOX_HandleMouseMove( descr, (INT16)LOWORD(lParam),