UpdateWindow just sends the WM_PAINT message to your app, it doesn't actually cause painting to happen. basically painting happens whenever your app has nothing else to do and your app gets around to processing the WM_PAINT message. that's not going to happen in the middle of a function (unless you're doing something like an old-school Message Pump between statements).
but, basically, there is no "erase" functionality. there is only draw. if you need to erase drawing A, you have to draw what was there before you drew A.
The most obvious reason for a new article to be deleted is that it did not pass moderation (i.e. was not considered to be of suitable quality for the site). Common mistakes include poor grammar, inadequate explanations and posting code snippets which duplicate MSDN content.
That being the case, I would suggest taking a good look at the article (you did keep a copy, didn't you?) and working out how to improve it. As a guideline, take a look at highly rated (say over 4.5) articles on the site to ee what is expected.
Once you consider it up to par, feel free to re-submit it.
My article was also deleted. I was hoping to use it as a future reference as well. God damn this site. It suck balls. Their article search is also FAIL. When you try to browse through articles, you'll see that the pages go on to infinity. I'm going to boycott this site now. I thought my articles would be able to help developers in the future too.
and i suspect, as David Crow notes below, that you're mixing Unicode and ANSI strings. GetPrivateProfileStringW is returning a wide char string, but NextSection is a char* pointer (not a wchar_t*), so it's only looking at one byte at a time:
GetPrivateProfileStringW gives you this:
n\0a\0m\0e\0 ... a NULL after each letter