comctl32/treeview: Correctly draw cut items.

This commit is contained in:
Nikolay Sivov 2011-05-22 11:29:51 +04:00 committed by Alexandre Julliard
parent a1f7c09b1c
commit 9bdd21cad5
1 changed files with 8 additions and 6 deletions

View File

@ -33,7 +33,7 @@
* *
* missing styles: TVS_FULLROWSELECT, TVS_INFOTIP, TVS_RTLREADING, * missing styles: TVS_FULLROWSELECT, TVS_INFOTIP, TVS_RTLREADING,
* *
* missing item styles: TVIS_CUT, TVIS_EXPANDPARTIAL, TVIS_EX_FLAT, * missing item styles: TVIS_EXPANDPARTIAL, TVIS_EX_FLAT,
* TVIS_EX_DISABLED * TVIS_EX_DISABLED
* *
* Make the insertion mark look right. * Make the insertion mark look right.
@ -2601,12 +2601,14 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
if (infoPtr->himlNormal) if (infoPtr->himlNormal)
{ {
int ovlIdx = item->state & TVIS_OVERLAYMASK; UINT style = item->state & TVIS_CUT ? ILD_SELECTED : ILD_NORMAL;
ImageList_Draw(infoPtr->himlNormal, imageIndex, hdc, style |= item->state & TVIS_OVERLAYMASK;
item->imageOffset,
centery - infoPtr->normalImageHeight / 2, ImageList_DrawEx(infoPtr->himlNormal, imageIndex, hdc,
ILD_NORMAL | ovlIdx); item->imageOffset, centery - infoPtr->normalImageHeight / 2,
0, 0, infoPtr->clrBk, item->state & TVIS_CUT ? GETBKCOLOR(infoPtr->clrBk) : CLR_DEFAULT,
style);
} }
} }