Author: jimtabor Date: Mon Mar 8 21:57:24 2010 New Revision: 46007
URL: http://svn.reactos.org/svn/reactos?rev=46007&view=rev Log: [User32] - Andrew Nguyen : Ensure That WM_INITDIALOG passes the first tabstop control handle to the dialog procedure. - Henri Verbeet : Also show dialogs right after a WM_TIMER message.
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/di... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Mon Mar 8 21:57:24 2010 @@ -560,6 +560,12 @@ DispatchMessageW( &msg ); } if (dlgInfo->flags & DF_END) break; + + if (bFirstEmpty && msg.message == WM_TIMER) + { + ShowWindow( hwnd, SW_SHOWNORMAL ); + bFirstEmpty = FALSE; + } } } if (dlgInfo->flags & DF_OWNERENABLED) DIALOG_EnableOwner( owner ); @@ -968,10 +974,13 @@
if (dlgProc) { - if (SendMessageW( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param ) && + HWND focus = GetNextDlgTabItem( hwnd, 0, FALSE ); + if (SendMessageW( hwnd, WM_INITDIALOG, (WPARAM)focus, param ) && ((~template.style & DS_CONTROL) || (template.style & WS_VISIBLE))) { - /* By returning TRUE, app has requested a default focus assignment */ + /* By returning TRUE, app has requested a default focus assignment. + * WM_INITDIALOG may have changed the tab order, so find the first + * tabstop control again. */ dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE); if( dlgInfo->hwndFocus ) SetFocus( dlgInfo->hwndFocus );