From cccec459d0164aab37c2c6cdccf4444ad29ebd93 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 22 Jun 2006 12:32:52 +0000 Subject: [PATCH] Wine port WM_SETREDRAW. svn path=/trunk/; revision=22500 --- reactos/dll/win32/user32/windows/defwnd.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index 190a06cd16f..d5b85155e97 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -196,12 +196,25 @@ UserGetInsideRectNC(HWND hWnd, RECT *rect) VOID DefWndSetRedraw(HWND hWnd, WPARAM wParam) { - if ((BOOL) wParam && 0 == (GetWindowLong(hWnd, GWL_STYLE) & WS_VISIBLE)) + LONG Style = GetWindowLong(hWnd, GWL_STYLE); + /* Content can be redrawn after a change. */ + if (wParam) { - ShowWindow(hWnd, SW_NORMAL); + if (!(Style & WS_VISIBLE)) /* Not Visible */ + { + SetWindowLong(hWnd, GWL_STYLE, WS_VISIBLE); + } } - - UNIMPLEMENTED; + else /* Content cannot be redrawn after a change. */ + { + if (Style & WS_VISIBLE) /* Visible */ + { + RedrawWindow( hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE ); + Style &= ~WS_VISIBLE; + SetWindowLong(hWnd, GWL_STYLE, Style); /* clear bits */ + } + } + return; }