I resend it because it seems to have be forgotten. Here is a patch from Dimitrie O. Paun and I to fix the custom draw notification. It fixes newsbin. a+ Max ChangeLog: * Fix listview custom draw notification for CDDS_ITEMPREPAINT and CDDS_SUBITEMPREPAINT messages. -- Maxime Bellengà <maxime.bellenge@laposte.net>
Index: wine/dlls/comctl32/listview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/listview.c,v retrieving revision 1.351 diff -u -r1.351 listview.c --- wine/dlls/comctl32/listview.c 13 May 2003 00:30:10 -0000 1.351 +++ wine/dlls/comctl32/listview.c 16 May 2003 19:50:03 -0000 @@ -272,6 +272,8 @@ DWORD dwHoverTime; HWND hwndToolTip; + DWORD cditemmode; /* Keep the custom draw flags for an item/row */ + DWORD lastKeyPressTimestamp; WPARAM charCode; INT nSearchParamLength; @@ -3526,7 +3528,7 @@ UINT uFormat, uView = infoPtr->dwStyle & LVS_TYPEMASK; WCHAR szDispText[DISP_TEXT_SIZE] = { '\0' }; WCHAR szCallback[] = { '(', 'c', 'a', 'l', 'l', 'b', 'a', 'c', 'k', ')', 0 }; - DWORD cditemmode = CDRF_DODEFAULT; + DWORD cdsubitemmode = CDRF_DODEFAULT; RECT* lprcFocus, rcSelect, rcBox, rcState, rcIcon, rcLabel; NMLVCUSTOMDRAW nmlvcd; HIMAGELIST himl; @@ -3566,13 +3568,16 @@ /* fill in the custom draw structure */ customdraw_fill(&nmlvcd, infoPtr, hdc, &rcBox, &lvItem); + if (nSubItem > 0) cdmode = infoPtr->cditemmode; if (cdmode & CDRF_NOTIFYITEMDRAW) - cditemmode = notify_prepaint (infoPtr, hdc, &nmlvcd); - if (cditemmode & CDRF_SKIPDEFAULT) goto postpaint; + cdsubitemmode = notify_prepaint ( infoPtr, hdc, &nmlvcd); + if (nSubItem == 0) infoPtr->cditemmode = cdsubitemmode; + if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; + /* in full row select, subitems, will just use main item's colors */ if (nSubItem && uView == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) nmlvcd.clrTextBk = CLR_NONE; /* state icons */ if (infoPtr->himlState && !IsRectEmpty(&rcState)) @@ -3631,7 +3636,7 @@ DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat); postpaint: - if (cditemmode & CDRF_NOTIFYPOSTPAINT) + if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); return TRUE; } @@ -3841,6 +3846,8 @@ oldClrTextBk = infoPtr->clrTextBk; oldClrText = infoPtr->clrText; + infoPtr->cditemmode = CDRF_DODEFAULT; + GetClientRect(infoPtr->hwndSelf, &rcClient); customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0); cdmode = notify_prepaint(infoPtr, hdc, &nmlvcd);