Erase the in-memory DC for treeview and fixes the rectangle calculation.

oldstable
Gerard Patel 2001-04-04 00:09:23 +00:00 committed by Alexandre Julliard
parent 66226d80f3
commit 9c2d2bad90
1 changed files with 12 additions and 1 deletions

View File

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