void RenderLine::Draw(_DC* pDC, _Rect rcLine, _Rect rcDraw, ESChildControl* pControl){ RenderItem* pItem = m_pFirstItem; _Rect rcItem, rcInvalid; int nOffsetX = rcLine.left; int nClientWidth = pControl->GetClientWidth(); while( pItem ){ if( pItem->m_fPosX > 0.0f ) nOffsetX = (pItem->m_fPosX*((float)nClientWidth)) + rcLine.left; rcItem.left = nOffsetX + pItem->m_ptOffset.x; rcItem.top = rcLine.top + pItem->m_ptOffset.y; if( pItem->m_fCX > 0.0f ){ rcItem.right = rcItem.left + (pItem->m_fCX*((float)nClientWidth)); rcItem.bottom = rcItem.top + pItem->m_szItem.cy; } else{ rcItem.right = rcItem.left + pItem->m_szItem.cx; rcItem.bottom = rcItem.top + pItem->m_szItem.cy; } rcInvalid = rcItem&rcDraw; if( !rcInvalid.IsRectEmpty() ) pItem->Draw(pDC, rcItem, rcInvalid, pControl); if( pItem->m_bBreakLine ) nOffsetX = rcLine.left; else nOffsetX += rcItem.Width(); pItem = pItem->m_pNext; } }