void CControlUI::DoPaint(HDC hDC, const RECT& rcPaint) { if( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return; // »æÖÆÑÐò£º±³¾°ÑÕÉ«->±³¾°Í¼->״̬ͼ->Îı¾->±ß¿ò SIZE cxyBorderRound = GetManager()->GetDPIObj()->Scale(m_cxyBorderRound); RECT rcBorderSize = GetManager()->GetDPIObj()->Scale(m_rcBorderSize); if( cxyBorderRound.cx > 0 || cxyBorderRound.cy > 0 ) { CRenderClip roundClip; CRenderClip::GenerateRoundClip(hDC, m_rcPaint, m_rcItem, cxyBorderRound.cx, cxyBorderRound.cy, roundClip); PaintBkColor(hDC); PaintBkImage(hDC); PaintStatusImage(hDC); PaintForeColor(hDC); PaintForeImage(hDC); PaintText(hDC); PaintBorder(hDC); } else { PaintBkColor(hDC); PaintBkImage(hDC); PaintStatusImage(hDC); PaintForeColor(hDC); PaintForeImage(hDC); PaintText(hDC); PaintBorder(hDC); } }
void CControlUI::DoPaint(HDC hDC, const RECT& rcPaint) { if( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return; // »æÖÆÑÐò£º±³¾°ÑÕÉ«->±³¾°Í¼->״̬ͼ->Îı¾->±ß¿ò if( m_cxyBorderRound.cx > 0 || m_cxyBorderRound.cy > 0 ) { CRenderClip roundClip; CRenderClip::GenerateRoundClip(hDC, m_rcPaint, m_rcItem, m_cxyBorderRound.cx, m_cxyBorderRound.cy, roundClip); PaintBkColor(hDC); PaintBkImage(hDC); PaintStatusImage(hDC); PaintForeColor(hDC); PaintForeImage(hDC); PaintText(hDC); PaintBorder(hDC); } else { PaintBkColor(hDC); PaintBkImage(hDC); PaintStatusImage(hDC); PaintForeColor(hDC); PaintForeImage(hDC); PaintText(hDC); PaintBorder(hDC); } }