Generally: do not draw somewhere outside
Instead store the string that you want to draw somewhere.
If you want to change that stored string you need to
InvalidateRect() the current portion of the window, change the string and
InvalidateRect() the new portion of the window.
InvalidateRect() can erase the background for you so no need to erase the not overwritten protion yourself. But it may cause flicker
WM_PAINT you just need to draw the stored string.
Thanks for sharing this good type of information... i need it... :)