It is possible to set a timer to signal you when
no action (i.e. no keyboard input and no mouse move)
has happened in a given time , and to re-set it each time
such input arrives. That is the screen-saver way.
Another question is to "know" when the system is idle.
You can set the priority of the background task to the lowest, so it will be given CPU time only when no other task is waiting to CPU. There is no need to "know" when
the system is idle for that purpose.
If your application wants to perform some job on the background, you can use the WM_IDLE (or something like that)
message sent when no other messages are in the queue (note, however, this does not mean that some thread of the process is not doing CPU-crunching without getting window messages !
It depends what you want to acheive, so use one or more of the above methods.
Good Luck ======
SeekerOfKnowledge
======