Non-MFC

I'd like to trigger a function in my program just before Windows runs the screensaver, however, why would the OS send this message (MAKEWPARAM(WM_SYSCOMMAND, SC_SCREENSAVE)) to my DialogProc? How can I do what I want?

Thanks

---
Regards,
Vitaly Belman
ICQ: 1912453