MCPcopy Create free account
hub / github.com/cinience/RedisStudio / PaintText

Method PaintText

DuiLib/Control/UIComboBox.cpp:84–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 4

GetInterfaceMethod · 0.45
DrawItemTextMethod · 0.45
SetPosMethod · 0.45
DoPaintMethod · 0.45

Tested by

no test coverage detected