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:
parent
52e8200cee
commit
4082e9a69c
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue