mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[USER32] Skip STATIC controls on arrow keys (#6142)
- Skip DLGC_STATIC controls on array keys. - Avoid infinite loop by using hwndFirst variable. CORE-6127
This commit is contained in:
parent
be8e4c691d
commit
db10ce0f9f
1 changed files with 11 additions and 1 deletions
|
@ -2624,7 +2624,17 @@ IsDialogMessageW(
|
|||
if (!(dlgCode & DLGC_WANTARROWS))
|
||||
{
|
||||
BOOL fPrevious = (lpMsg->wParam == VK_LEFT || lpMsg->wParam == VK_UP);
|
||||
HWND hwndNext = GetNextDlgGroupItem( hDlg, lpMsg->hwnd, fPrevious );
|
||||
|
||||
/* Skip STATIC elements when arrow-moving through a list of controls */
|
||||
HWND hwndNext, hwndFirst = lpMsg->hwnd;
|
||||
for (hwndNext = GetNextDlgGroupItem(hDlg, hwndFirst, fPrevious);
|
||||
hwndNext && hwndFirst != hwndNext;
|
||||
hwndNext = GetNextDlgGroupItem(hDlg, hwndNext, fPrevious))
|
||||
{
|
||||
if (!(SendMessageW(hwndNext, WM_GETDLGCODE, 0, 0) & DLGC_STATIC))
|
||||
break;
|
||||
}
|
||||
|
||||
if (hwndNext && SendMessageW( hwndNext, WM_GETDLGCODE, lpMsg->wParam, (LPARAM)lpMsg ) == (DLGC_BUTTON | DLGC_RADIOBUTTON))
|
||||
{
|
||||
SetFocus( hwndNext );
|
||||
|
|
Loading…
Reference in a new issue