From 7163d097d0551bd6793e1e5b8e2dec07f8ecc1f7 Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Sat, 1 Aug 2009 11:26:40 +0000 Subject: [PATCH] - Handle WM_SETREDRAW messages differently in the DefWndProc, ported from current Wine - Fixes mIRC riched component regression, no more riched20 reverts for releases needed See issue #4098 for more details. svn path=/trunk/; revision=42321 --- reactos/dll/win32/user32/windows/defwnd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index e4b7c8a3d32..e09867135e9 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -1245,7 +1245,14 @@ User32DefWindowProc(HWND hWnd, case WM_SETREDRAW: { - DefWndSetRedraw(hWnd, wParam); + LONG_PTR Style = GetWindowLongPtrW(hWnd, GWL_STYLE); + if (wParam) SetWindowLongPtr(hWnd, GWL_STYLE, Style | WS_VISIBLE); + else + { + RedrawWindow(hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE); + Style &= ~WS_VISIBLE; + SetWindowLongPtr(hWnd, GWL_STYLE, Style); + } return (0); }