Peter,
I'm away from the code but as far as I can remember off the top of my head:
I probably thought "if is2K" check vs directly calling GetCursorPos() didn't have much impact (few milliseconds maybe) and to make sure ptLastPoint property is initialized (generally leaving such values at their default .f., setting in code).
Also that code is old and what I came up with then.
Cetin
>Hi Cetin,
>
>Thanks for your elaboration on the screensaver questions.
>
>My first question is (in other words): Microsoft has introduced the api-call GetLastInputInfo to enable developers to check the last-input moment of the whole system, also as THE means to check since when the system is idle. Why is GetCursorPos() done earlier in your code, even if it is win2k or xp?
>
>>Hi Peter,
>>1) Couldn't understand this question. It's checked for all. Activity accepted to occur with either mouse movement or a keypress. For mouse checking GetCursorPos() and saving last point where mouse is.
>>2) Checking screensaver because if a screensaver is set it could do the work for me. Then I check if a screensaver state was entered.
>>3) No the code pasted there is not complete. Just the core pieces.
>>
>>Here is a more detailed version (not full but near):
>[snip]