Changed from GetWindowRect() in windows/contianer.c to get the parent's client size to GetClientRect(); we're only interested in the size, and WM_PRINTCLIENT is strictly for the client :/ It's still correct as far as I know (the old code used it).

This commit is contained in:
Pietro Gagliardi 2015-05-05 20:56:07 -04:00
parent 9f8d16b26a
commit 58540b2b2b
1 changed files with 2 additions and 3 deletions

View File

@ -32,9 +32,8 @@ static HBRUSH getControlBackgroundBrush(HWND hwnd, HDC dc, RECT *hwndScreenRect)
break;
}
// TODO get client rect instead?
if (GetWindowRect(parent, &parentRect) == 0)
logLastError("error getting parent's window rect in getControlBackgroundBrush()");
if (GetClientRect(parent, &parentRect) == 0)
logLastError("error getting parent's client rect in getControlBackgroundBrush()");
cdc = CreateCompatibleDC(dc);
if (cdc == NULL)