Commit 9c2d2bad authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

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

parent 66226d80
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment