Click here to Skip to main content
15,312,009 members
Articles / Desktop Programming / MFC
Article
Posted 25 Oct 2002

Stats

112.6K views
2.1K downloads
32 bookmarked

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
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

Share

About the Author

Chen Su
Software Developer
Canada Canada
No Biography provided

Comments and Discussions

 
Generalupdate for VS 2003 Pin
Jim Dill15-Jun-07 4:04
MemberJim Dill15-Jun-07 4:04 
GeneralProgram not compiling Pin
Adeel68823-May-06 20:32
MemberAdeel68823-May-06 20:32 
GeneralRe: Program not compiling Pin
Chen Su24-May-06 6:40
MemberChen Su24-May-06 6:40 
GeneralNice little framework Pin
reggie758-Feb-06 9:50
Memberreggie758-Feb-06 9:50 
GeneralNice FrameWork! Pin
ThatsAlok6-Jul-05 2:30
MemberThatsAlok6-Jul-05 2:30 
Generalscreen saver & Flash animation Pin
_rho_26-Sep-03 2:12
Member_rho_26-Sep-03 2:12 
GeneralCenter of screen and screen depth Pin
joelparker17-Sep-03 13:32
Memberjoelparker17-Sep-03 13:32 
GeneralRe: Center of screen and screen depth Pin
Chen Su17-Sep-03 17:07
MemberChen Su17-Sep-03 17:07 
Generalinstall Pin
Marcin G12-May-03 9:59
MemberMarcin G12-May-03 9:59 
GeneralBrowser Pin
Marcin G10-May-03 12:00
MemberMarcin G10-May-03 12:00 
GeneralRe: Browser Pin
Chen Su10-May-03 18:32
MemberChen Su10-May-03 18:32 
GeneralRe: Browser Pin
Marcin G12-May-03 4:34
MemberMarcin G12-May-03 4:34 
GeneralRe: Browser Pin
Marcin G12-May-03 5:39
MemberMarcin G12-May-03 5:39 
GeneralRe: Browser Pin
Chen Su12-May-03 8:23
MemberChen Su12-May-03 8:23 
GeneralRe: Browser Pin
Marcin G12-May-03 8:28
MemberMarcin G12-May-03 8:28 
GeneralRe: Browser Pin
Marcin G12-May-03 8:26
MemberMarcin G12-May-03 8:26 
GeneralRe: Browser Pin
Chen Su12-May-03 8:41
MemberChen Su12-May-03 8:41 
GeneralRe: Browser Pin
Marcin G12-May-03 9:56
MemberMarcin G12-May-03 9:56 
GeneralRe: Browser Pin
Chen Su12-May-03 10:07
MemberChen Su12-May-03 10:07 
GeneralRe: Browser Pin
Marcin G13-May-03 4:06
MemberMarcin G13-May-03 4:06 
GeneralAbout DLL Pin
scrraja21-Feb-03 1:00
Memberscrraja21-Feb-03 1:00 
GeneralRe: About DLL Pin
Chen Su21-Feb-03 6:56
MemberChen Su21-Feb-03 6:56 
QuestionChange file name from saver.scr to another? Pin
msvcpp27-Jan-03 5:44
Membermsvcpp27-Jan-03 5:44 
AnswerRe: Change file name from saver.scr to another? Pin
Chen Su27-Jan-03 18:38
MemberChen Su27-Jan-03 18:38 
Generaldisplaye control in screensaver Pin
quzi20-Nov-02 23:20
Memberquzi20-Nov-02 23:20 

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.