|
|
1.1 root 1: /*
2: scrnsave.h
3:
4: This is the header file for the skelton.lib file. This file is used as a
5: skeleton for creating Windows 3.0 SCR files.
6:
7: Date Modification
8: 04 12 90 Original
9: 04 16 90 Changed to allow control panel
10: 08 28 92 [stevecat] Removed password stuff, added Mandatory ID string,
11: and made it a public\sdk file
12:
13: /* Define the number for the icon... */
14: /* This should be the first icon used and must have this resource number.
15: This is needed as the first icon in the file will be grabbed as well as
16: the icon number being 100???... */
17: #define ID_APP 100
18:
19: /* MANDATORY string required in .RC file */
20: /* This string should contain a < 25 char name/description of the screen
21: saver. This string is what will be seen by the user in the Control Panel's
22: Desktop applet screen saver listbox. */
23: #define IDS_DESCRIPTION 1
24:
25: /* This function is called by skeleton to use as a Window Procedure. It is
26: up to the programmer to handle any of the messages that wish to be
27: interpretted. Any unused messages are then passed back to DefScreenSaverProc
28: if desired which will take default action on any unprocessed message... */
29:
30: LONG WINAPI ScreenSaverProc (HWND hWnd, UINT message, DWORD wParam, LONG lParam);
31:
32: /* This function handles any default messages. The following interpretations
33: are:
34: WM_CREATE:
35: WM_DESTROY:
36: No default actions are taken.
37: WM_SETCURSOR:
38: By default, this will set the cursor to a null cursor, thereby removing it
39: from the screen.
40: WM_PAINT:
41: By default, this will paint the background of the screen.
42: WM_LBUTTONDOWN:
43: WM_MBUTTONDOWN:
44: WM_RBUTTONDOWN:
45: WM_KEYDOWN:
46: WM_MOUSEMOVE:
47: By default, these will cause the program to terminate.
48: WM_ACTIVATEAPP:
49: WM_ACTIVATE:
50: By default, if the wParam parameter is FALSE ( signifying that transfer is
51: being taken away from the application ), then the program will terminate.
52:
53: Termination is accomplished by generating a WM_CLOSE message. This way, if
54: the user sets something up in the WM_CREATE, a WM_DESTROY will be
55: generated and it can be destroyed properly.
56: */
57: LONG WINAPI DefScreenSaverProc (HWND hWnd, UINT msg, DWORD wParam, LONG lParam);
58:
59: /* A function is also needed for configuring the screen saver. The function
60: should be exactly like it is below and must be exported such that the
61: program can use MAKEPROCINSTANCE on it and call up a dialog box. Further-
62: more, the template used for the dialog must be called ScreenSaverConfigure
63: to allow the main function to access it...
64: */
65: BOOL WINAPI ScreenSaverConfigureDialog (HWND hDlg, UINT message, DWORD wParam, LONG lParam);
66:
67: /* To allow the programmer the ability to register child control windows, this
68: function is called prior to the creation of the dialog box. Any
69: registering that is required should be done here, or return TRUE if none
70: is needed... */
71: BOOL WINAPI RegisterDialogClasses (HANDLE hInst);
72:
73: /*
74: There are only three other points that should be of notice:
75: 1) The screen saver must have a string declared as 'szAppName' contaning the
76: name of the screen saver, and it must be declared as a global.
77: 2) The screen saver EXE file should be renamed to a file with a SCR
78: extension so that the screen saver dialog form the control panel can
79: find it when is searches for screen savers.
80: 3) If the executables window or instance are needed, they can be obtained
81: by the following definitions in the files that nedd them:
82:
83: extern HANDLE hMainInstance;
84: extern HWND hMainWindow;
85: */
86:
87: #define WS_GT ( WS_GROUP | WS_TABSTOP )
88: #define MAXFILELEN 13
89: #define BUFFLEN 255
90:
91: CHAR szIniFile[MAXFILELEN];
92: CHAR szScreenSaver[22];
93: CHAR szHelpFile[MAXFILELEN];
94: CHAR szNoHelpMemory[BUFFLEN];
95:
96:
97:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.