Hi All,

I've problem with text drawing... when i trying redraw text it always overlaps previous.

here is a part of my code:

void CMySlider::Draw( const TRect& aRect ) const
{
CWindowGc &gc = SystemGc();

/*skipped*/

gc.SetPenColor( KRgbWhite );
gc.SetPenSize( TSize( 1, 1 ) );
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
gc.SetPenStyle( CGraphicsContext::ESolidPen );

if ( m_MinFont ) {

gc.UseFont( m_MinFont );

if ( m_MinText.Length() > 0 ) {
gc.DrawText( m_MinText, TPoint(SLIDER_SHRINK, aRect.Height() - m_MaxFont->HeightInPixels()) );
}

gc.DiscardFont();
}

if ( m_MaxFont ) {

gc.UseFont( m_MaxFont );

if ( m_MaxText.Length() > 0 ) {
gc.DrawText( m_MaxText, TPoint(aRect.Width() - m_MaxFont->TextWidthInPixels(m_MaxText), aRect.Height() - m_MaxFont->HeightInPixels()) );
}

gc.DiscardFont();
}
}

DrawNow called from main window by timer event.

--
Best Regards