From b632fef3b13dc082acbbbd8aaf6898c663da1c0b Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 5 Nov 2014 13:35:39 -0500 Subject: Implemented TextField.ReadOnly() on Mac OS X. Began standardizing window class name access on Windows. --- common_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common_windows.c') diff --git a/common_windows.c b/common_windows.c index 207b691..9e67a0c 100644 --- a/common_windows.c +++ b/common_windows.c @@ -100,7 +100,7 @@ void paintControlBackground(HWND hwnd, HDC dc) HWND parent; RECT r; POINT p, pOrig; - WCHAR classname[128] = L""; // more than enough to avoid collisions + WCHAR classname[maxClassName + 1] = L""; parent = hwnd; for (;;) { @@ -110,7 +110,7 @@ void paintControlBackground(HWND hwnd, HDC dc) // wine sends these messages early, yay... if (parent == msgwin) return; - if (GetClassNameW(parent, classname, 128) == 0) + if (GetClassNameW(parent, classname, maxClassName) == 0) xpanic("error getting name of focused window class in paintControlBackground()", GetLastError()); // skip groupboxes; they're (supposed to be) transparent if (_wcsicmp(classname, L"button") != 0) -- cgit v1.2.3