Author: weiden
Date: Wed Nov 21 12:12:20 2007
New Revision: 30613
URL:
http://svn.reactos.org/svn/reactos?rev=30613&view=rev
Log:
Make dialogs update the UI state
Modified:
trunk/reactos/dll/win32/user32/windows/defwnd.c
trunk/reactos/dll/win32/user32/windows/dialog.c
Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c Wed Nov 21 12:12:20 2007
@@ -1683,7 +1683,7 @@
{
/* We're a child window and we need to pass this message down until
we reach the root */
- hWnd = UserHMGetHandle(Wnd->Parent);
+ hWnd = UserHMGetHandle((PWINDOW)DesktopPtrToUser(Wnd->Parent));
}
else
{
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/dialog.c (original)
+++ trunk/reactos/dll/win32/user32/windows/dialog.c Wed Nov 21 12:12:20 2007
@@ -816,6 +816,8 @@
SetFocus( dlgInfo->hwndFocus );
}
+ SendMessageW( hwnd, WM_CHANGEUISTATE, MAKEWPARAM(UIS_INITIALIZE, 0), 0);
+
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE
) & WS_VISIBLE))
{
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
@@ -2207,6 +2209,8 @@
case VK_TAB:
if (!(dlgCode & DLGC_WANTTAB))
{
+ SendMessageW(hDlg, WM_CHANGEUISTATE, MAKEWPARAM(UIS_CLEAR,
UISF_HIDEFOCUS), 0);
+
/* I am not sure under which circumstances the TAB is handled
* each way. All I do know is that it does not always simply
* send WM_NEXTDLGCTL. (Personally I have never yet seen it
@@ -2306,6 +2310,10 @@
return TRUE;
}
break;
+
+ case WM_SYSKEYDOWN:
+ SendMessageW(hDlg, WM_CHANGEUISTATE, MAKEWPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0);
+ break;
}
TranslateMessage( lpMsg );