Fixed Group child control transparency on Windows.
This commit is contained in:
parent
d0f9c8af8a
commit
2e4ede72cf
|
@ -110,15 +110,20 @@ void paintControlBackground(HWND hwnd, HDC dc)
|
||||||
RECT r;
|
RECT r;
|
||||||
POINT p;
|
POINT p;
|
||||||
int saved;
|
int saved;
|
||||||
|
WCHAR classname[128] = L""; // more than enough to avoid collisions
|
||||||
|
|
||||||
// TODO traverse deeper if a groupbox
|
|
||||||
// TODO implement WM_PRINTCLIENT in window_windows.c
|
// TODO implement WM_PRINTCLIENT in window_windows.c
|
||||||
parent = GetParent(hwnd);
|
parent = hwnd;
|
||||||
if (parent == NULL)
|
do {
|
||||||
xpanic("error getting parent container of control in paintControlBackground()", GetLastError());
|
parent = GetParent(parent);
|
||||||
parent = GetParent(parent);
|
if (parent == NULL)
|
||||||
if (parent == NULL)
|
xpanic("error getting parent container of control in paintControlBackground()", GetLastError());
|
||||||
xpanic("error getting parent control of control in paintControlBackground()", GetLastError());
|
parent = GetParent(parent);
|
||||||
|
if (parent == NULL)
|
||||||
|
xpanic("error getting parent control of control in paintControlBackground()", GetLastError());
|
||||||
|
if (GetClassNameW(parent, classname, 128) == 0)
|
||||||
|
xpanic("error getting name of focused window class in paintControlBackground()", GetLastError());
|
||||||
|
} while (_wcsicmp(classname, L"button") == 0); // skip groupboxes
|
||||||
if (GetWindowRect(hwnd, &r) == 0)
|
if (GetWindowRect(hwnd, &r) == 0)
|
||||||
xpanic("error getting control's window rect in paintControlBackground()", GetLastError());
|
xpanic("error getting control's window rect in paintControlBackground()", GetLastError());
|
||||||
// the above is a window rect; convert to client rect
|
// the above is a window rect; convert to client rect
|
||||||
|
|
Loading…
Reference in New Issue