CDC FillSolidRect() behavior?
Posted on 1999-07-29
I am drawing text into a CScrollView window. Serial data is streaming in from selectable remote devices. I don't want to invalidate the entire window since that causes annoying flickering, but I want to clear each line before I draw it.
So I started playing with FillSolidRect().
pDC->FillSolidRect( 0, 0, 120, 17, pDC->GetBkColor() );
I expected that to clear out the specifed rectangle but nothing happens. The old text just stays there.
Then if I do:
CString str = "The quick red fox yada yada";
pDC->TextOut( 0, 0, str );
the new string is just written over the old one.
Why didn't FillSolidRect() fill a solid rectangle. Am I asking too much?