Do not issue a GetUpdateRect() to query an update region for

WM_PAINT(wParam=HDC) case. Instead, use GetClientRect() for a bounding
rect.
This commit is contained in:
Alex Villacís Lasso 2005-11-08 13:11:48 +00:00 committed by Alexandre Julliard
parent 52e8200cee
commit 4082e9a69c
1 changed files with 2 additions and 12 deletions

View File

@ -2849,18 +2849,8 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, WPARAM wParam)
if (wParam)
{
hdc = (HDC)wParam;
if (!GetUpdateRect(infoPtr->hwnd, &rc, TRUE))
{
HBITMAP hbitmap;
BITMAP bitmap;
hbitmap = GetCurrentObject(hdc, OBJ_BITMAP);
if (!hbitmap) return 0;
GetObjectW(hbitmap, sizeof(BITMAP), &bitmap);
rc.left = 0; rc.top = 0;
rc.right = bitmap.bmWidth;
rc.bottom = bitmap.bmHeight;
TREEVIEW_EraseBackground(infoPtr, (HDC)wParam);
}
GetClientRect(infoPtr->hwnd, &rc);
TREEVIEW_EraseBackground(infoPtr, hdc);
}
else
{