
Monitoring System Idle Time
Quote:
>Check out CWinApp::OnIdle. It might do what you need.
>Hope this helps!
I've already tried that. It does not work well. The application does not
appear to reset the idle count when there is superfluous mouse movement,
clicks, or key strokes. So I don't get a true idle time for anything.
The best I have been able to do is to override the
CWinApp::PreTranslateMessage() method. At this point, none of the mouse
moves, button clicks and keystrokes have been stripped off or handled at this
point. Thus I can get a very good indication of how little the user is using
the current application. However the message queue does not contain any user
input events which do not belong to the application. I.e., any user input to
other applications or NT itself cannot be monitored this way, that I can tell
anyways. So, does anyone have an idea on how to monitor system-wide messages?
Thanks for the input, keep it coming.
Wayne Rigby