Mkennedy1102
2007-05-21 01:45:00 UTC
I want to redraw only a portion of my View, for example I have a CRect in the
lower right corner where my app draws some text, I want to redraw that rect
when the info changes, so if that CRect is named rect, I call
InvalidateRect(&rect) (the berase parameter is moot in this case). However
this does nothing. If I call Invalidate() to repaint the screen, it works
fine, but I want to reduce my drawing overhead. Where am I going wrong with
InvalidateRect? According to MSDN :
"The invalidated areas accumulate in the update region until the region is
processed when the next WM_PAINT message occurs or until the region is
validated by using the ValidateRect or ValidateRgn function."
How do I make that happen? I have tried PostMessage(WM_PAINT), I have tried
calling OnPaint from within my code. I must be missing something here. Much
thanks for any help.
lower right corner where my app draws some text, I want to redraw that rect
when the info changes, so if that CRect is named rect, I call
InvalidateRect(&rect) (the berase parameter is moot in this case). However
this does nothing. If I call Invalidate() to repaint the screen, it works
fine, but I want to reduce my drawing overhead. Where am I going wrong with
InvalidateRect? According to MSDN :
"The invalidated areas accumulate in the update region until the region is
processed when the next WM_PAINT message occurs or until the region is
validated by using the ValidateRect or ValidateRgn function."
How do I make that happen? I have tried PostMessage(WM_PAINT), I have tried
calling OnPaint from within my code. I must be missing something here. Much
thanks for any help.