mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 03:48:01 +00:00
comctl32/comboex: Reduce variable scope.
This commit is contained in:
parent
0d01212dac
commit
101c8ca5ac
@ -1741,7 +1741,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
|
||||
case WM_KEYDOWN: {
|
||||
INT_PTR oldItem, selected, step = 1;
|
||||
INT_PTR oldItem, selected;
|
||||
CBE_ITEMDATA *item;
|
||||
|
||||
switch ((INT)wParam)
|
||||
@ -1851,13 +1851,15 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
break;
|
||||
|
||||
case VK_UP:
|
||||
step = -1;
|
||||
case VK_DOWN:
|
||||
/* by default, step is 1 */
|
||||
{
|
||||
INT step = wParam == VK_DOWN ? 1 : -1;
|
||||
|
||||
oldItem = SendMessageW (infoPtr->hwndSelf, CB_GETCURSEL, 0, 0);
|
||||
if (oldItem >= 0 && oldItem + step >= 0)
|
||||
SendMessageW (infoPtr->hwndSelf, CB_SETCURSEL, oldItem + step, 0);
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user