Set clipping region to client window in LISTBOX_Paint.

This commit is contained in:
Gerard Patel 2000-06-15 00:58:42 +00:00 committed by Alexandre Julliard
parent ed923a57ca
commit ac3e81640a
1 changed files with 10 additions and 0 deletions

View File

@ -924,6 +924,16 @@ static LRESULT LISTBOX_Paint( WND *wnd, LB_DESCR *descr, HDC hdc )
rect.right += descr->horz_pos;
}
if (IS_OWNERDRAW(descr))
{
RECT r;
HRGN hrgn;
GetClientRect(wnd->hwndSelf, &r);
hrgn = CreateRectRgnIndirect(&r);
SelectClipRgn( hdc, hrgn);
DeleteObject( hrgn );
}
if (descr->font) oldFont = SelectObject( hdc, descr->font );
hbrush = SendMessageA( descr->owner, WM_CTLCOLORLISTBOX,
hdc, (LPARAM)wnd->hwndSelf );