Click here to Skip to main content
12,826,806 members (33,751 online)
Click here to Skip to main content
Add your own
alternative version


18 bookmarked
Posted 6 Jul 2006

ScreenSaver Manager - An example of using the SystemTray class in WTL

, 6 Jul 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
Managing screensaver activity from the Taskbar.

Sample Image - ssman.gif


Sometimes I need a tool that could stop running the screensaver (for example, when I'm waiting for an important email message). I've looked over CodeProject and found some nice solutions. I gathered them together and spent 3 or 4 hours to write this small tool.


  • Enable/disable screensaver from the taskbar
  • Restore original state of screensaver on exit
  • Restore icon in taskbar after Explorer crashes
  • Easy access to Control Panel -> Desktop Settings


At the base of this project is Chris Maunder's System Tray class and the Win32 API SystemParametersInfo function.

To start with, I created a WTL Dialog-Based Project and then removed MainDialog, and added a main window class inherited from the CWindowImpl class. To implement check boxes in the popup menu that shows when the user right-clicks in the taskbar icon, I needed to inherit my own class from CSystemTray. Its virtual function CustomizeMenu was rewritten. Then, I added some SystemParametersInfo calls, including CLimitSingleInstance from Microsoft. Some modifications were made in CSystemTray.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Eugene Podkopaev
Web Developer
Russian Federation Russian Federation
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170326.1 | Last Updated 7 Jul 2006
Article Copyright 2006 by Eugene Podkopaev
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid