From d09f528ad20bd20460ae9a10e3e84d7032b1c38a Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 18 Jul 2005 03:13:11 +0000 Subject: [PATCH] Implement ShowOwnedPopups and ArrangeIconicWindows. Based on Wine. More work is needed on both. svn path=/trunk/; revision=16630 --- reactos/lib/user32/windows/defwnd.c | 5 +++-- reactos/lib/user32/windows/window.c | 24 ++++++------------------ reactos/lib/user32/windows/winpos.c | 8 ++++++++ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index 409c2517e9f..784be583a20 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -1269,14 +1269,15 @@ User32DefWindowProc(HWND hWnd, if (!lParam) return 0; Style = GetWindowLongW(hWnd, GWL_STYLE); - if (!(Style & WS_POPUP)) - return 0; +// if (!(Style & WS_POPUP)) +// return 0; if ((Style & WS_VISIBLE) && wParam) return 0; if (!(Style & WS_VISIBLE) && !wParam) return 0; if (!GetWindow(hWnd, GW_OWNER)) return 0; + NtUserCallTwoParam((DWORD) hWnd, (DWORD) wParam, TWOPARAM_ROUTINE_ROS_SHOWWINDOW); ShowWindow(hWnd, wParam ? SW_SHOWNA : SW_HIDE); break; } diff --git a/reactos/lib/user32/windows/window.c b/reactos/lib/user32/windows/window.c index 4648e24281d..55c63f14633 100644 --- a/reactos/lib/user32/windows/window.c +++ b/reactos/lib/user32/windows/window.c @@ -48,17 +48,6 @@ AllowSetForegroundWindow(DWORD dwProcessId) } -/* - * @unimplemented - */ -UINT STDCALL -ArrangeIconicWindows(HWND hWnd) -{ - UNIMPLEMENTED; - return 0; -} - - /* * @unimplemented */ @@ -1084,15 +1073,15 @@ AnimateWindow(HWND hwnd, BOOL visible; visible = IsWindowVisible(hwnd); -// if(!IsWindow(hwnd) || -// (visible && !(dwFlags & AW_HIDE)) || -// (!visible && (dwFlags & AW_HIDE))) + if(!IsWindow(hwnd) || + (visible && !(dwFlags & AW_HIDE)) || + (!visible && (dwFlags & AW_HIDE))) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } -// ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA)); + ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA)); return TRUE; } @@ -1273,14 +1262,13 @@ SetWindowTextW(HWND hWnd, /* - * @unimplemented + * @implemented */ BOOL STDCALL ShowOwnedPopups(HWND hWnd, BOOL fShow) { - UNIMPLEMENTED; - return FALSE; + return (BOOL)NtUserCallTwoParam((DWORD)hWnd, fShow, TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS); } diff --git a/reactos/lib/user32/windows/winpos.c b/reactos/lib/user32/windows/winpos.c index c0e7d512f9b..60189c757f9 100644 --- a/reactos/lib/user32/windows/winpos.c +++ b/reactos/lib/user32/windows/winpos.c @@ -55,3 +55,11 @@ SetActiveWindow(HWND hWnd) return(NtUserSetActiveWindow(hWnd)); } +/* + * @unimplemented + */ +UINT STDCALL +ArrangeIconicWindows(HWND hWnd) +{ + return NtUserCallHwndLock( hWnd, HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS); +}