From ac24a0a6926e76e88fdb9e456a925896a96d1d3d Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 12 Nov 2003 22:41:27 +0000 Subject: [PATCH] A multicolumn listview should get a customdraw notification for the item as well as one for subitem 0. --- dlls/comctl32/listview.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 2c0dd9a2c3c..d685146d4f7 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3599,6 +3599,12 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS cdsubitemmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); if (nSubItem == 0) infoPtr->cditemmode = cdsubitemmode; if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; + /* we have to send a CDDS_SUBITEM customdraw explicitly for subitem 0 */ + if (nSubItem == 0 && cdsubitemmode == CDRF_NOTIFYITEMDRAW) + { + cdsubitemmode = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd); + if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; + } if (nSubItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW)) prepaint_setup(infoPtr, hdc, &nmlvcd);