I'm wrong; read-only edit controls on Windows DO get their backgrounds from their parents. Thanks gamax92 for help confirming.

This commit is contained in:
Pietro Gagliardi 2015-05-07 00:23:35 -04:00
parent 9d45ca5ecd
commit 316657e09e
1 changed files with 0 additions and 6 deletions

View File

@ -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);