Instead of or along with InvalidateRect() function try to use Refresh() call