diff --git a/win32ss/user/user32/windows/dialog.c b/win32ss/user/user32/windows/dialog.c index 784b43b9493..ba2cf67270b 100644 --- a/win32ss/user/user32/windows/dialog.c +++ b/win32ss/user/user32/windows/dialog.c @@ -29,6 +29,7 @@ */ #include +#include WINE_DEFAULT_DEBUG_CHANNEL(user32); @@ -1359,6 +1360,25 @@ static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); } +/*********************************************************************** + * DIALOG_GetTabCtrl + * + */ +static HWND DIALOG_GetTabCtrl( HWND hwndDlg ) +{ + WCHAR szClass[32]; + + HWND hChildCtrl = GetWindow(hwndDlg,GW_CHILD); + while(hChildCtrl) + { + GetClassNameW(hChildCtrl, szClass, _countof(szClass)); + if (lstrcmpiW(szClass, WC_TABCONTROLW) == 0) + return hChildCtrl; + hChildCtrl = GetWindow(hChildCtrl,GW_HWNDNEXT); + } + return NULL; +} + /*********************************************************************** * DIALOG_GetNextTabItem * @@ -2554,6 +2574,22 @@ IsDialogMessageW( switch(lpMsg->wParam) { case VK_TAB: + if (GetKeyState(VK_CONTROL) & 0x8000) + { + HWND hwndTab = DIALOG_GetTabCtrl(hDlg); + if (hwndTab) + { + int index = SendMessageW(hwndTab, TCM_GETCURSEL, 0, 0); + index = (GetKeyState(VK_SHIFT) & 0x8000)?index-1:index+1; + if (index>=0) + { + SendMessageW(hwndTab, TCM_SETCURFOCUS, (WPARAM)(index), 0); + } + return TRUE; + } + return FALSE; + } + if (!(dlgCode & DLGC_WANTTAB)) { BOOL fIsDialog = TRUE;