| 1726 | } |
| 1727 | |
| 1728 | void CListElementUI::DrawItemBk(HDC hDC, const RECT& rcItem) |
| 1729 | { |
| 1730 | ASSERT(m_pOwner); |
| 1731 | if( m_pOwner == NULL ) return; |
| 1732 | TListInfoUI* pInfo = m_pOwner->GetListInfo(); |
| 1733 | DWORD iBackColor = 0; |
| 1734 | if( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) iBackColor = pInfo->dwBkColor; |
| 1735 | if( (m_uButtonState & UISTATE_HOT) != 0 ) { |
| 1736 | iBackColor = pInfo->dwHotBkColor; |
| 1737 | } |
| 1738 | if( IsSelected() ) { |
| 1739 | iBackColor = pInfo->dwSelectedBkColor; |
| 1740 | } |
| 1741 | if( !IsEnabled() ) { |
| 1742 | iBackColor = pInfo->dwDisabledBkColor; |
| 1743 | } |
| 1744 | |
| 1745 | if ( iBackColor != 0 ) { |
| 1746 | CRenderEngine::DrawColor(hDC, m_rcItem, GetAdjustColor(iBackColor)); |
| 1747 | } |
| 1748 | |
| 1749 | if( !IsEnabled() ) { |
| 1750 | if( !pInfo->sDisabledImage.IsEmpty() ) { |
| 1751 | if( !DrawImage(hDC, (LPCTSTR)pInfo->sDisabledImage) ) pInfo->sDisabledImage.Empty(); |
| 1752 | else return; |
| 1753 | } |
| 1754 | } |
| 1755 | if( IsSelected() ) { |
| 1756 | if( !pInfo->sSelectedImage.IsEmpty() ) { |
| 1757 | if( !DrawImage(hDC, (LPCTSTR)pInfo->sSelectedImage) ) pInfo->sSelectedImage.Empty(); |
| 1758 | else return; |
| 1759 | } |
| 1760 | } |
| 1761 | if( (m_uButtonState & UISTATE_HOT) != 0 ) { |
| 1762 | if( !pInfo->sHotImage.IsEmpty() ) { |
| 1763 | if( !DrawImage(hDC, (LPCTSTR)pInfo->sHotImage) ) pInfo->sHotImage.Empty(); |
| 1764 | else return; |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | if( !m_sBkImage.IsEmpty() ) { |
| 1769 | if( !pInfo->bAlternateBk || m_iIndex % 2 == 0 ) { |
| 1770 | if( !DrawImage(hDC, (LPCTSTR)m_sBkImage) ) m_sBkImage.Empty(); |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | if( m_sBkImage.IsEmpty() ) { |
| 1775 | if( !pInfo->sBkImage.IsEmpty() ) { |
| 1776 | if( !DrawImage(hDC, (LPCTSTR)pInfo->sBkImage) ) pInfo->sBkImage.Empty(); |
| 1777 | else return; |
| 1778 | } |
| 1779 | } |
| 1780 | |
| 1781 | if ( pInfo->dwLineColor != 0 ) { |
| 1782 | RECT rcLine = { m_rcItem.left, m_rcItem.bottom - 1, m_rcItem.right, m_rcItem.bottom - 1 }; |
| 1783 | CRenderEngine::DrawLine(hDC, rcLine, 1, GetAdjustColor(pInfo->dwLineColor)); |
| 1784 | } |
| 1785 | } |
nothing calls this directly
no test coverage detected