I have the same problem but my application sends almost every second
some
new message to the screen which I now cannot see anymore ( it shows
relevant information about the process ).
This is because the application is not running the "while (GetMessage()) /
DispatchMessage()" loop. Pre-XP, application windows that did not run the
standard message loop were ill-behaved, but the screen would still be
updated. From XP and beyond, these ill-behaved apps get their windows
disconnected from the screen.
If the process ask for user-intervention then the screen is active
again.
This is because the user-intervention probably displays a DialogBox(), which
does run the "while (GetMessage()) / DispatchMessage()" loop. The
previously-sent messages get processed, so the window is no longer "Not
Responding", and screen updates can occur.
It is very unpleasant because the messages which are lost are
important.
You have to run the standard message loop, and split the processing into
"chunks", and process a "chunk" while handling a window message.
Or, you run the standard message loop, but start a new thread to do the
processing.
Or, you convert the program to be a console application.
May be it was already in XP but it does not show up there
I found that the MSDN for GetMessage documents this "ghost" behavior for XP:
"Windows XP: If a top-level window stops responding to messages for more
than several seconds, the system considers the window to be hung and
replaces it with a ghost window that has the same z-order, location, size,
and visual attributes. This allows the user to move it, resize it, or even
close the application. However, these are the only actions available because
the application is actually hung. When in the debugger mode, the system does
not generate a ghost window."
Note: the statement "the application is actually hung" is somewhat
misleading. The application is actually still running. But, because it is
ill-behaved, the operating system classifies it as hung.