| 50 | } |
| 51 | |
| 52 | RECT CSliderUI::GetThumbRect() const |
| 53 | { |
| 54 | if( m_bHorizontal ) { |
| 55 | int left = m_rcItem.left + (m_rcItem.right - m_rcItem.left - m_szThumb.cx) * (m_nValue - m_nMin) / (m_nMax - m_nMin); |
| 56 | int top = (m_rcItem.bottom + m_rcItem.top - m_szThumb.cy) / 2; |
| 57 | return CDuiRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy); |
| 58 | } |
| 59 | else { |
| 60 | int left = (m_rcItem.right + m_rcItem.left - m_szThumb.cx) / 2; |
| 61 | int top = m_rcItem.bottom - m_szThumb.cy - (m_rcItem.bottom - m_rcItem.top - m_szThumb.cy) * (m_nValue - m_nMin) / (m_nMax - m_nMin); |
| 62 | return CDuiRect(left, top, left + m_szThumb.cx, top + m_szThumb.cy); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | LPCTSTR CSliderUI::GetThumbImage() const |
| 67 | { |
nothing calls this directly
no outgoing calls
no test coverage detected