From 316657e09e74541df0532283c4f023ebf1d46bc6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 7 May 2015 00:23:35 -0400 Subject: [PATCH] I'm wrong; read-only edit controls on Windows DO get their backgrounds from their parents. Thanks gamax92 for help confirming. --- windows/container.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/windows/container.c b/windows/container.c index fd1493f2..54919490 100644 --- a/windows/container.c +++ b/windows/container.c @@ -200,12 +200,6 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP if (c->brush != NULL) if (DeleteObject(c->brush) == 0) logLastError("error deleting old background brush in containerWndProc()"); - // read-only TextFields and Textboxes are exempt - // this is because read-only edit controls count under WM_CTLCOLORSTATIC - // TODO really? - if (windowClassOf((HWND) lParam, L"edit", NULL) == 0) - if ((getStyle((HWND) lParam) & ES_READONLY) != 0) - break; if (SetBkMode((HDC) wParam, TRANSPARENT) == 0) logLastError("error setting transparent background mode to controls in containerWndProc()"); c->brush = getControlBackgroundBrush((HWND) lParam, (HDC) wParam);