| 517 | } |
| 518 | |
| 519 | void CEditUI::PaintText(HDC hDC) |
| 520 | { |
| 521 | if( m_dwTextColor == 0 ) m_dwTextColor = m_pManager->GetDefaultFontColor(); |
| 522 | if( m_dwDisabledTextColor == 0 ) m_dwDisabledTextColor = m_pManager->GetDefaultDisabledColor(); |
| 523 | |
| 524 | if( m_sText.IsEmpty() ) return; |
| 525 | |
| 526 | CDuiString sText = m_sText; |
| 527 | if( m_bPasswordMode ) { |
| 528 | sText.Empty(); |
| 529 | LPCTSTR p = m_sText.GetData(); |
| 530 | while( *p != _T('\0') ) { |
| 531 | sText += m_cPasswordChar; |
| 532 | p = ::CharNext(p); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | RECT rc = m_rcItem; |
| 537 | rc.left += m_rcTextPadding.left; |
| 538 | rc.right -= m_rcTextPadding.right; |
| 539 | rc.top += m_rcTextPadding.top; |
| 540 | rc.bottom -= m_rcTextPadding.bottom; |
| 541 | if( IsEnabled() ) { |
| 542 | CRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwTextColor, \ |
| 543 | m_iFont, DT_SINGLELINE | m_uTextStyle); |
| 544 | } |
| 545 | else { |
| 546 | CRenderEngine::DrawText(hDC, m_pManager, rc, sText, m_dwDisabledTextColor, \ |
| 547 | m_iFont, DT_SINGLELINE | m_uTextStyle); |
| 548 | |
| 549 | } |
| 550 | } |
| 551 | } |
nothing calls this directly
no test coverage detected