user32/dialog.c: GetNextDlgTabItem returns hwndDlg if it does not contain controls.

Alexandre Julliard julliard at winehq.org
Thu Aug 19 08:51:32 CDT 2010


"Mikhail Maroukhine" <mikolg at yandex.ru> writes:

> @@ -1695,7 +1696,19 @@ HWND WINAPI GetNextDlgTabItem( HWND hwndDlg, HWND hwndCtrl,
>       */
>      if (!hwndCtrl && fPrevious) return 0;
>  
> -    return DIALOG_GetNextTabItem(hwndDlg,hwndDlg,hwndCtrl,fPrevious);
> +    nextItem = DIALOG_GetNextTabItem(hwndDlg,hwndDlg,hwndCtrl,fPrevious);
> +    
> +    /* if next tab item not found return the first child even if it does not have TABSTOP 
> +       Checked on XP
> +    */
> +    if (!nextItem && !fPrevious) nextItem = GetWindow(hwndDlg,GW_CHILD);
> +
> +    /* if there is no controls on hwndDlg return hwndDlg
> +       Checked on XP
> +    */
> +    if (!nextItem && !fPrevious) nextItem = hwndDlg;
> +    
> +    return nextItem;

You should test the fPrevious case too, it's probably similar.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list