http://bugs.winehq.org/show_bug.cgi?id=6878
Summary: LineTo not updating bounds rectangle (GetBoundsRect) Product: Wine Version: 0.9.12. Platform: PC URL: http://www.bbcbasic.co.uk/boundbug.exe OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-gdi-(printing) AssignedTo: wine-bugs@winehq.org ReportedBy: richard@rtrussell.co.uk
The following code should set the bounds rectangle to {0,0,1001,1001} but under Wine 0.9.12 the rectangle remains empty. This causes a failed window refresh, since the bounds rectangle is used for a subsequent InvalidateRect. The window remains blank until moved or forcibly refreshed.
RECT rc = {0} ; HDC hdc = GetDC (hwnd) ; HDC memhdc = CreateCompatibleDC (NULL); HBITMAP bitmap = CreateCompatibleBitmap (hdc, 1920, 1440);
ReleaseDC (hwnd, hdc) ; SelectObject (memhdc, bitmap) ;
SetBoundsRect (memhdc, NULL, DCB_ENABLE | DCB_RESET); MoveToEx (memhdc, 0, 0, NULL); LineTo (memhdc, 1000, 1000); GetBoundsRect (memhdc, &rc, 0);
InvalidateRect (hwnd, &rc, 0);
A complete source file is here: http://www.bbcbasic.co.uk/boundbug.c A Windows executable is here: http://www.bbcbasic.co.uk/boundbug.exe