summaryrefslogtreecommitdiff
path: root/common_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-11-05 16:36:44 -0500
committerPietro Gagliardi <[email protected]>2014-11-05 16:36:44 -0500
commit2a337df8e58b8dd82ed50ebbbb99cc4623a9b6ed (patch)
tree0f9cf1ae829c4588f02c18000c35608738e8380b /common_windows.c
parent745fdc9dc6f7f0e59ba2e372327d59cf899929ca (diff)
Fixed up appearance of read-only TextFields on Windows.
Diffstat (limited to 'common_windows.c')
-rw-r--r--common_windows.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common_windows.c b/common_windows.c
index e0142c8..d1447f6 100644
--- a/common_windows.c
+++ b/common_windows.c
@@ -118,7 +118,11 @@ BOOL sharedWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *
return TRUE;
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORBTN:
- // TODO exempt read-only textboxes
+ // read-only TextFields and Textboxes are exempt
+ // this is because read-only edit controls count under WM_CTLCOLORSTATIC
+ if (windowClassOf((HWND) lParam, L"edit", NULL) == 0)
+ if (textfieldReadOnly((HWND) lParam))
+ return FALSE;
if (SetBkMode((HDC) wParam, TRANSPARENT) == 0)
xpanic("error setting transparent background mode to Labels", GetLastError());
paintControlBackground((HWND) lParam, (HDC) wParam);