| 820 | } |
| 821 | |
| 822 | void CScrollBarUI::PaintButton1(HDC hDC) |
| 823 | { |
| 824 | if( !m_bShowButton1 ) return; |
| 825 | |
| 826 | if( !IsEnabled() ) m_uButton1State |= UISTATE_DISABLED; |
| 827 | else m_uButton1State &= ~ UISTATE_DISABLED; |
| 828 | |
| 829 | m_sImageModify.Empty(); |
| 830 | m_sImageModify.SmallFormat(_T("dest='%d,%d,%d,%d'"), m_rcButton1.left - m_rcItem.left, \ |
| 831 | m_rcButton1.top - m_rcItem.top, m_rcButton1.right - m_rcItem.left, m_rcButton1.bottom - m_rcItem.top); |
| 832 | |
| 833 | if( (m_uButton1State & UISTATE_DISABLED) != 0 ) { |
| 834 | if( !m_sButton1DisabledImage.IsEmpty() ) { |
| 835 | if( !DrawImage(hDC, (LPCTSTR)m_sButton1DisabledImage, (LPCTSTR)m_sImageModify) ) m_sButton1DisabledImage.Empty(); |
| 836 | else return; |
| 837 | } |
| 838 | } |
| 839 | else if( (m_uButton1State & UISTATE_PUSHED) != 0 ) { |
| 840 | if( !m_sButton1PushedImage.IsEmpty() ) { |
| 841 | if( !DrawImage(hDC, (LPCTSTR)m_sButton1PushedImage, (LPCTSTR)m_sImageModify) ) m_sButton1PushedImage.Empty(); |
| 842 | else return; |
| 843 | } |
| 844 | } |
| 845 | else if( (m_uButton1State & UISTATE_HOT) != 0 ) { |
| 846 | if( !m_sButton1HotImage.IsEmpty() ) { |
| 847 | if( !DrawImage(hDC, (LPCTSTR)m_sButton1HotImage, (LPCTSTR)m_sImageModify) ) m_sButton1HotImage.Empty(); |
| 848 | else return; |
| 849 | } |
| 850 | } |
| 851 | |
| 852 | if( !m_sButton1NormalImage.IsEmpty() ) { |
| 853 | if( !DrawImage(hDC, (LPCTSTR)m_sButton1NormalImage, (LPCTSTR)m_sImageModify) ) m_sButton1NormalImage.Empty(); |
| 854 | else return; |
| 855 | } |
| 856 | |
| 857 | DWORD dwBorderColor = 0xFF85E4FF; |
| 858 | int nBorderSize = 2; |
| 859 | CRenderEngine::DrawRect(hDC, m_rcButton1, nBorderSize, dwBorderColor); |
| 860 | } |
| 861 | |
| 862 | void CScrollBarUI::PaintButton2(HDC hDC) |
| 863 | { |
nothing calls this directly
no test coverage detected