| 900 | } |
| 901 | |
| 902 | void CScrollBarUI::PaintThumb(HDC hDC) |
| 903 | { |
| 904 | if( m_rcThumb.left == 0 && m_rcThumb.top == 0 && m_rcThumb.right == 0 && m_rcThumb.bottom == 0 ) return; |
| 905 | if( !IsEnabled() ) m_uThumbState |= UISTATE_DISABLED; |
| 906 | else m_uThumbState &= ~ UISTATE_DISABLED; |
| 907 | |
| 908 | m_sImageModify.Empty(); |
| 909 | m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcThumb.left - m_rcItem.left, \ |
| 910 | m_rcThumb.top - m_rcItem.top, m_rcThumb.right - m_rcItem.left, m_rcThumb.bottom - m_rcItem.top); |
| 911 | |
| 912 | if( (m_uThumbState & UISTATE_DISABLED) != 0 ) { |
| 913 | if( !m_sThumbDisabledImage.IsEmpty() ) { |
| 914 | if( !DrawImage(hDC, (LPCTSTR)m_sThumbDisabledImage, (LPCTSTR)m_sImageModify) ) m_sThumbDisabledImage.Empty(); |
| 915 | else return; |
| 916 | } |
| 917 | } |
| 918 | else if( (m_uThumbState & UISTATE_PUSHED) != 0 ) { |
| 919 | if( !m_sThumbPushedImage.IsEmpty() ) { |
| 920 | if( !DrawImage(hDC, (LPCTSTR)m_sThumbPushedImage, (LPCTSTR)m_sImageModify) ) m_sThumbPushedImage.Empty(); |
| 921 | else return; |
| 922 | } |
| 923 | } |
| 924 | else if( (m_uThumbState & UISTATE_HOT) != 0 ) { |
| 925 | if( !m_sThumbHotImage.IsEmpty() ) { |
| 926 | if( !DrawImage(hDC, (LPCTSTR)m_sThumbHotImage, (LPCTSTR)m_sImageModify) ) m_sThumbHotImage.Empty(); |
| 927 | else return; |
| 928 | } |
| 929 | } |
| 930 | |
| 931 | if( !m_sThumbNormalImage.IsEmpty() ) { |
| 932 | if( !DrawImage(hDC, (LPCTSTR)m_sThumbNormalImage, (LPCTSTR)m_sImageModify) ) m_sThumbNormalImage.Empty(); |
| 933 | else return; |
| 934 | } |
| 935 | |
| 936 | DWORD dwBorderColor = 0xFF85E4FF; |
| 937 | int nBorderSize = 2; |
| 938 | CRenderEngine::DrawRect(hDC, m_rcThumb, nBorderSize, dwBorderColor); |
| 939 | } |
| 940 | |
| 941 | void CScrollBarUI::PaintRail(HDC hDC) |
| 942 | { |
nothing calls this directly
no test coverage detected