Click here to Skip to main content
15,891,708 members
Articles / Desktop Programming / MFC
Article

A Complete Screen Saver Framework Using MFC

Rate me:
Please Sign up or sign in to vote.
4.86/5 (11 votes)
25 Oct 20021 min read 118.3K   2.2K   33   26
complete screen saver framework with an installation program.

Introduction

Here is a complete screen saver framework. It is based on the MFC sample "SAVER: Screen Saver" that comes with Visual C++. But I added more functionality so that it does everything a screen saver needs to do. To help you understand it and insert your own code, I removed all the drawing code so that it is as simple as possible (blank screen). In addition, I wrote a simple installation program. This installation program puts the screen saver (saver.scr) into its resource so that only one executable file (sinstall.exe) needs to be distributed. The Project Workspace contains two projects. One is the screen saver itself, another is the installation program.

In most cases, you will only need to make the following modifications.

  • Add drawing code in the drawwnd.h and drawwnd.cpp.
  • Add a configuration dialog box, launch it in the CSaverApp::DoConfig() function of the saver.cpp.
  • Add your own resource if any (resource.h and saver.rc).

For your reference, I list some Web sites related to Windows screen saver programming here.

Happy Screen Saving!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: displaye control in screensaver Pin
Chen Su21-Nov-02 7:49
Chen Su21-Nov-02 7:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.