Index: static.c =================================================================== --- static.c (revision 54217) +++ static.c (working copy) @@ -324,15 +324,26 @@ } } +BOOL WINAPI GdiValidateHandle(HGDIOBJ hobj); + static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc) { + PWND pwnd; HBRUSH hBrush; HWND parent = GetParent(hwnd); if (!parent) parent = hwnd; + // ReactOS + pwnd = ValidateHwnd(parent); + if (pwnd && !TestWindowProcess(pwnd)) + { + return (HBRUSH)DefWindowProcW( parent, WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd); + } + //// hBrush = (HBRUSH) SendMessageW( parent, WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd ); - if (!hBrush) /* did the app forget to call DefWindowProc ? */ + if (!hBrush || /* did the app forget to call DefWindowProc ? */ + !GdiValidateHandle(hBrush)) // ReactOS { /* FIXME: DefWindowProc should return different colors if a manifest is present */