
How to detect system idle time?
You can put a counter in CWinApp::OnIdle that counts the elapsed time.
use ::timeGetTime or a similar function, subtract off a member variable
start time, compare to a target, and GO! - Doug S.
Quote:
> How does one go about determining how long it's been since the user used the
> system? At a given time, I need to be able to determine if the user has
> used the computer in the last n minutes.
> I know the app get a WM_SYSCOMMAND message with a SC_SCREENSAVE (sp?) so we
> can do some sort of screen saver routine work, but this is not an approach I
> can use. My app has its own setting for the amount of time to wait.
> Thanks in advance for any help.
> Mike Dembroge