Subitems of listviews were not painted with the right background when:

-LVS_EX_FULLROWSELECT style is defined
-item is selected
-Listview doesn't have the focus.
This commit is contained in:
Stephane Lussier 2000-10-13 17:05:17 +00:00 committed by Alexandre Julliard
parent 21b099f082
commit 907a1e615b
1 changed files with 11 additions and 4 deletions

View File

@ -2812,11 +2812,18 @@ static VOID LISTVIEW_DrawSubItem(HWND hwnd, HDC hdc, INT nItem, INT nSubItem,
LISTVIEW_FillBackground(hwnd, hdc, &rcTemp);
/* set item colors */
if (ListView_GetItemState(hwnd,nItem,LVIS_SELECTED)
&&(infoPtr->bFocus != FALSE) && Selected)
if (ListView_GetItemState(hwnd,nItem,LVIS_SELECTED) && Selected)
{
SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
if (infoPtr->bFocus)
{
SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
}
else
{
SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
SetTextColor(hdc, GetSysColor(COLOR_BTNTEXT));
}
}
else
{