Do not call ownerdraw for invalid items (empty focusrects).

Fixes Eudora 16bit empty Inbox problem.
This commit is contained in:
Marcus Meissner 1999-01-20 14:08:00 +00:00 committed by Alexandre Julliard
parent bfd0228180
commit 9ad9017edd
1 changed files with 8 additions and 0 deletions

View File

@ -453,6 +453,14 @@ static void LISTBOX_PaintItem( WND *wnd, LB_DESCR *descr, HDC32 hdc,
DRAWITEMSTRUCT32 dis;
UINT32 id = (descr->lphc) ? ID_CB_LISTBOX : wnd->wIDmenu;
if (!item)
{
if (action == ODA_FOCUS)
DrawFocusRect32( hdc, rect );
else
FIXME(listbox,"called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items);
return;
}
dis.CtlType = ODT_LISTBOX;
dis.CtlID = id;
dis.hwndItem = wnd->hwndSelf;