|
|
1.1.1.2 ! root 1: /*****************************************************************************\ ! 2: * * ! 3: * scrnsave.h Windows NT 3.1 screensaver defines and definitions. * ! 4: * * ! 5: * Version 1.0 * ! 6: * * ! 7: * NOTE: windows.h must be #included first * ! 8: * * ! 9: * Windows NT NOTE: (Differences from Win 3.1 Screensavers) * ! 10: * * ! 11: * All Screensavers are required to have a Description string * ! 12: * of no more than 25 chars for display by the Control Panel's * ! 13: * Desktop applet. This is string 1 in the resource string * ! 14: * table of the Windows 32-bit screen saver .SCR (.EXE) file. * ! 15: * * ! 16: * Passwords for Windows NT Screen Savers are handled by the * ! 17: * Winlogon process. If the registry value: * ! 18: * * ! 19: * HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaverIsSecure * ! 20: * * ! 21: * is nonzero, Winlogon will ask for the User's login password * ! 22: * before allowing the Screen Saver to exit. All password data * ! 23: * and dialogs have been removed from individual Screensavers. * ! 24: * * ! 25: * * ! 26: * Copyright (c) 1992, Microsoft Corp. All rights reserved. * ! 27: * * ! 28: \*****************************************************************************/ ! 29: ! 30: #ifndef _INC_SCRNSAVE ! 31: #define _INC_SCRNSAVE ! 32: ! 33: #ifndef RC_INVOKED ! 34: #pragma pack(1) /* Assume byte packing throughout */ ! 35: #endif /* !RC_INVOKED */ ! 36: ! 37: #ifdef __cplusplus ! 38: extern "C" { /* Assume C declarations for C++ */ ! 39: #endif /* __cplusplus */ ! 40: ! 41: ! 42: /* MANDATORY string required in .RC file ! 43: * This string should contain a less than 25 char name/description of the ! 44: * screen saver. This string is what will be seen by the user in the Control ! 45: * Panel's Desktop applet screen saver listbox. ! 46: */ 1.1 root 47: 1.1.1.2 ! root 48: #define IDS_DESCRIPTION 1 1.1 root 49: 1.1.1.2 ! root 50: /* Icon resource ID. ! 51: * ! 52: * This should be the first icon used and must have this resource number. ! 53: * This is needed as the first icon in the file will be grabbed ! 54: */ 1.1 root 55: #define ID_APP 100 1.1.1.2 ! root 56: #define DLG_SCRNSAVECONFIGURE 2003 1.1 root 57: 1.1.1.2 ! root 58: #define idsIsPassword 1000 ! 59: #define idsIniFile 1001 ! 60: #define idsScreenSaver 1002 ! 61: #define idsPassword 1003 ! 62: #define idsDifferentPW 1004 ! 63: #define idsChangePW 1005 ! 64: #define idsBadOldPW 1006 ! 65: #define idsAppName 1007 ! 66: #define idsNoHelpMemory 1008 ! 67: #define idsHelpFile 1009 ! 68: ! 69: /* This function is the Window Procedure for the screen saver. It is ! 70: * up to the programmer to handle any of the messages that wish to be ! 71: * interpretted. Any unused messages are then passed back to ! 72: * DefScreenSaverProc if desired which will take default action on any ! 73: * unprocessed message... ! 74: */ ! 75: LRESULT WINAPI ScreenSaverProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); ! 76: ! 77: /* This function performs default message processing. Currently handles ! 78: * the following messages: ! 79: * ! 80: * WM_SYSCOMMAND: return FALSE if wParam is SC_SCREENSAVE or SC_CLOSE ! 81: * ! 82: * WM_DESTROY: PostQuitMessage(0) ! 83: * ! 84: * WM_SETCURSOR: By default, this will set the cursor to a null cursor, ! 85: * thereby removing it from the screen. ! 86: * ! 87: * WM_LBUTTONDOWN: ! 88: * WM_MBUTTONDOWN: ! 89: * WM_RBUTTONDOWN: ! 90: * WM_KEYDOWN: ! 91: * WM_KEYUP: ! 92: * WM_MOUSEMOVE: By default, these will cause the program to terminate. ! 93: * Unless the password option is enabled. In that case ! 94: * the DlgGetPassword() dialog box is brought up. ! 95: * ! 96: * WM_NCACTIVATE: ! 97: * WM_ACTIVATEAPP: ! 98: * WM_ACTIVATE: By default, if the wParam parameter is FALSE (signifying ! 99: * that transfer is being taken away from the application), ! 100: * then the program will terminate. Termination is ! 101: * accomplished by generating a WM_CLOSE message. This way, ! 102: * if the user sets something up in the WM_CREATE, a ! 103: * WM_DESTROY will be generated and it can be destroyed ! 104: * properly. ! 105: * This message is ignored, however is the password option ! 106: * is enabled. ! 107: */ ! 108: LRESULT WINAPI DefScreenSaverProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); 1.1 root 109: 110: /* A function is also needed for configuring the screen saver. The function 1.1.1.2 ! root 111: * should be exactly like it is below and must be exported such that the ! 112: * program can use MAKEPROCINSTANCE on it and call up a dialog box. Further- ! 113: * more, the template used for the dialog must be called ! 114: * ScreenSaverConfigure to allow the main function to access it... ! 115: */ ! 116: BOOL WINAPI ScreenSaverConfigureDialog (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); 1.1 root 117: 118: /* To allow the programmer the ability to register child control windows, this 1.1.1.2 ! root 119: * function is called prior to the creation of the dialog box. Any ! 120: * registering that is required should be done here, or return TRUE if none ! 121: * is needed... ! 122: */ 1.1 root 123: BOOL WINAPI RegisterDialogClasses (HANDLE hInst); 124: 1.1.1.2 ! root 125: /* The following functions are called by DefScreenSaverProc and must ! 126: * be exported by all screensavers using this model. ! 127: */ 1.1 root 128: 1.1.1.2 ! root 129: /* ! 130: * There are only three other points that should be of notice: ! 131: * 1) The screen saver must have a string declared as 'szAppName' contaning the ! 132: * name of the screen saver, and it must be declared as a global. ! 133: * 2) The screen saver EXE file should be renamed to a file with a SCR ! 134: * extension so that the screen saver dialog from the control panel can ! 135: * find it when is searches for screen savers. ! 136: */ ! 137: #define WS_GT (WS_GROUP | WS_TABSTOP) ! 138: ! 139: #define MAXFILELEN 13 ! 140: #define TITLEBARNAMELEN 40 ! 141: #define APPNAMEBUFFERLEN 40 ! 142: #define BUFFLEN 255 ! 143: ! 144: /* The following globals are defined in scrnsave.lib */ ! 145: extern HANDLE hMainInstance; ! 146: extern HWND hMainWindow; ! 147: extern TCHAR szName[TITLEBARNAMELEN]; ! 148: extern TCHAR szAppName[APPNAMEBUFFERLEN]; ! 149: extern TCHAR szIniFile[MAXFILELEN]; ! 150: extern TCHAR szScreenSaver[22]; ! 151: extern TCHAR szHelpFile[MAXFILELEN]; ! 152: extern TCHAR szNoHelpMemory[BUFFLEN]; ! 153: extern UINT MyHelpMessage; ! 154: ! 155: #ifdef __cplusplus ! 156: } ! 157: #endif /* __cplusplus */ ! 158: ! 159: #ifndef RC_INVOKED ! 160: #pragma pack() ! 161: #endif /* !RC_INVOKED */ 1.1 root 162: 1.1.1.2 ! root 163: #endif /* !_INC_SCRNSAVE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.