Click here to Skip to main content
15,886,518 members
Articles / Programming Languages / C++

Holistic Screensavers: Beginning to End

Rate me:
Please Sign up or sign in to vote.
4.91/5 (39 votes)
14 Jun 2003Public Domain23 min read 166.2K   2.7K   96  
Best practices for screensaver coding/distribution.
#include <windows.h>

1                       ICON                    "minscr.ico"
1                       RT_MANIFEST             "manifest.txt"


STRINGTABLE 
BEGIN
    1                       "Minimal"
    2                       "http://www.wischik.com/lu/scr"
END


DLG_GENERAL DIALOG  0, 0, 237, 220
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
    WS_SYSMENU
CAPTION "General"
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "You can display the screen saver immediately, or prevent it from\nappearing at all, by moving the mouse pointer to a corner on \nthe screen.  Click the corners you want to use.",
                    101,13,8,282,43
    LTEXT           "The system agent must be active in order for you to display \nthe screen saver immediately by moving the mouse \npointer to a corner on the screen.",
                    102,13,8,282,43
    GROUPBOX        "Options for dismissing the screen saver",103,7,154,223,
                    47
    LTEXT           "&Mouse sensitivity",104,13,169,58,12
    COMBOBOX        105,74,167,148,72,CBS_DROPDOWNLIST | WS_VSCROLL | 
                    WS_TABSTOP
    RTEXT           "&Wait",106,13,186,16,12
    EDITTEXT        107,35,184,30,12
    CONTROL         "Generic1",108,"msctls_updown32",UDS_SETBUDDYINT | 
                    UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,57,184,11,
                    36
    COMBOBOX        109,74,184,50,36,CBS_DROPDOWNLIST | WS_VSCROLL | 
                    WS_TABSTOP
    LTEXT           "before requiring a password",110,130,186,95,11
    CONTROL         "-YN-",112,"ScrMonitor",0,52,35,123,105
    CONTROL         "Mute Sound",113,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
                    11,202,65,15
END

DLG_OPTIONS DIALOG  0, 0, 237, 220
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
    WS_SYSMENU
CAPTION "Options"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "",101,"ScrMonitor",0,52,12,123,105
    CONTROL         "Big Blobs",102,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
                    13,120,65,15
END


DLG_ABOUT DIALOG 53, 20, 163, 81
STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            1,-1,7,5,21,20
    DEFPUSHBUTTON   "OK",IDOK,115,61,40,14
    CONTROL         "<title>",101,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,35,10,
                    115,8
    LTEXT           "Based on code by Lucian Wischik,",-1,35,34,120,8
    LTEXT           "www.wischik.com/scr",102,35,44,120,8
END


MONITOR                 BITMAP                  "monitor.bmp"



VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,0
 PRODUCTVERSION 1,0,0,0
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "080904b0"
        BEGIN
            VALUE "FileDescription", "Minimal Screen Saver"
            VALUE "FileVersion", "1, 0, 0, 0"
            VALUE "InternalName", "minscr"
            VALUE "LegalCopyright", "Copyright (C) 1999-2003 Lucian Wischik"
            VALUE "OriginalFilename", "minscr.exe"
            VALUE "ProductName", "Minimal Screen Savers"
            VALUE "ProductVersion", "1, 0, 0, 0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x809, 1200
    END
END



By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Technical Lead
United States United States
Lucian studied theoretical computer science in Cambridge and Bologna, and then moved into the computer industry. Since 2004 he's been paid to do what he loves -- designing and implementing programming languages! The articles he writes on CodeProject are entirely his own personal hobby work, and do not represent the position or guidance of the company he works for. (He's on the VB/C# language team at Microsoft).

Comments and Discussions