| 82 | } |
| 83 | |
| 84 | void CComboBoxUI::PaintText(HDC hDC) |
| 85 | { |
| 86 | RECT rcText = m_rcItem; |
| 87 | rcText.left += m_rcTextPadding.left; |
| 88 | rcText.right -= m_rcTextPadding.right; |
| 89 | rcText.top += m_rcTextPadding.top; |
| 90 | rcText.bottom -= m_rcTextPadding.bottom; |
| 91 | |
| 92 | rcText.right -= m_nArrowWidth; // add this line than CComboUI::PaintText(HDC hDC) |
| 93 | |
| 94 | if( m_iCurSel >= 0 ) { |
| 95 | CControlUI* pControl = static_cast<CControlUI*>(m_items[m_iCurSel]); |
| 96 | IListItemUI* pElement = static_cast<IListItemUI*>(pControl->GetInterface(_T("ListItem"))); |
| 97 | if( pElement != NULL ) { |
| 98 | pElement->DrawItemText(hDC, rcText); |
| 99 | } |
| 100 | else { |
| 101 | RECT rcOldPos = pControl->GetPos(); |
| 102 | pControl->SetPos(rcText); |
| 103 | pControl->DoPaint(hDC, rcText); |
| 104 | pControl->SetPos(rcOldPos); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | } |
nothing calls this directly
no test coverage detected