From 937c311155b3abedbee1d11fda7467644141ee79 Mon Sep 17 00:00:00 2001 From: Gregor Brunmar Date: Thu, 15 May 2008 20:11:26 +0000 Subject: [PATCH] Synced listbox LB_SETCURSEL behaviour with Wine, to pass a couple of more winetests. svn path=/trunk/; revision=33534 --- reactos/dll/win32/user32/controls/listbox.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/user32/controls/listbox.c b/reactos/dll/win32/user32/controls/listbox.c index e94ca00fb05..587913fa05b 100644 --- a/reactos/dll/win32/user32/controls/listbox.c +++ b/reactos/dll/win32/user32/controls/listbox.c @@ -3101,10 +3101,10 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, #endif case LB_SETCURSEL: if (IS_MULTISELECT(descr)) return LB_ERR; - LISTBOX_SetCaretIndex( descr, wParam, TRUE ); + LISTBOX_SetCaretIndex( descr, wParam, FALSE ); ret = LISTBOX_SetSelection( descr, wParam, TRUE, FALSE ); - if (lphc && ret != LB_ERR) ret = descr->selected_item; - return ret; + if (ret != LB_ERR) ret = descr->selected_item; + return ret; #ifndef __REACTOS__ case LB_GETSELCOUNT16: @@ -3448,9 +3448,10 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg, break; default: - if ((msg >= WM_USER) && (msg < 0xc000)) + /*if ((msg >= WM_USER) && (msg < 0xc000)) WARN("[%p]: unknown msg %04x wp %08lx lp %08lx\n", - hwnd, msg, wParam, lParam ); + hwnd, msg, wParam, lParam );*/ + break; } return unicode ? DefWindowProcW( hwnd, msg, wParam, lParam ) :