During long term operations our C++ Win32 application shows a modal status dialog with a process bar, which is updated irregular every few seconds or so. Starting with Windows 7 we realized that Windows quite soon shows a message " seems to hang..." and/or appends "Not responding" to our window title bar.
We figured out that the process dialog must handle messages to avoid this. More specifically it seems that Windows 7 is constantly sending WM_UPDATE messages to check if our program is alive. We formerly had disabled all unneeded message handling in this dialog as profile runs shows that they were a major slow down.
But although we thought to have fixed that problem users are reporting such problems again: Windows shows " seems to hang..." and/or appends "Not responding" to our window title bar, although we handle all events every few seconds.
Questions:
Is there any documentation about this change of behavior in Windows 7 (or Windows vista)? We haven't found any. We also found a number of other changes of messaging behavior.
Is there possibly a way to disable all such "is alive" checks from windows? Our Application is pretty well alive and processes can take quite long.
EDIT: To be more specific - what we only do each few seconds is calling the message pump PeekMessage
/TranslateMessage
/DispatchMessage
.
As this is a quite old legacy program, using a separate worker thread is not possible in the near future. We of course do that for new code. Please note also that my main point is that this behavior definitely changed with Windows vista / Windows 7. I have not found any documentation thereabout.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…