Busy Application leads to false "Not responding" state on Windows 7 - WM_UPDATE
Well, the direct answer to your question is that you can call DisableProcessWindowsGhosting()
.
However, it would be much better to address the root of the problem rather than suppress the symptoms. Your window is being ghosted because you aren't pumping the message queue. You aren't doing that for the admirable reason that your application is busy doing work. The accepted way to do work and keep your queue pumped, is to do the work in a separate thread.