home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Development Kit 0.9 beta / MDKBeta_Release3_ISO9660.iso / mdk / include / scrnsave.h < prev   
Encoding:
C/C++ Source or Header  |  1991-06-16  |  3.2 KB  |  79 lines

  1. /*
  2. skeleton.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.  
  11. /* Define the number for the icon... */
  12. /* This should be the first icon used and must have this resource number.
  13. This is needed as the first icon in the file will be grabbed as well as
  14. the icon number being 100???... */
  15. #define ID_APP      100
  16.  
  17. /* This function is called by skeleton to use as a Window Procedure.  It is
  18. up to the programmer to handle any of the messages that wish to be 
  19. interpretted.  Any unused messages are then passed back to DefScreenSaverProc
  20. if desired which will take default action on any unprocessed message... */
  21. LONG FAR PASCAL         ScreenSaverProc ( HWND, unsigned, WORD, LONG );
  22.  
  23. /* This function handles any default messages.  The following interpretations
  24.     are:
  25. WM_CREATE:
  26. WM_DESTROY:
  27.     No default actions are taken.
  28. WM_SETCURSOR:
  29.     By default, this will set the cursor to a null cursor, thereby removing it
  30.     from the screen.
  31. WM_PAINT:
  32.     By default, this will paint the background of the screen.
  33. WM_LBUTTONDOWN:
  34. WM_MBUTTONDOWN:
  35. WM_RBUTTONDOWN:
  36. WM_KEYDOWN:
  37. WM_MOUSEMOVE:
  38.     By default, these will cause the program to terminate.
  39. WM_ACTIVATEAPP:
  40. WM_ACTIVATE:
  41.     By default, if the wParam parameter is FALSE ( signifying that transfer is
  42.     being taken away from the application ), then the program will terminate.
  43.  
  44. Termination is accomplished by generating a WM_CLOSE message.  This way, if
  45.     the user sets something up in the WM_CREATE, a WM_DESTROY will be 
  46.     generated and it can be destroyed properly.
  47. */
  48. LONG                DefScreenSaverProc          ( HWND, unsigned, WORD, LONG );
  49.  
  50. /* A function is also needed for configuring the screen saver.  The function
  51.     should be exactly like it is below and must be exported such that the
  52.     program can use MAKEPROCINSTANCE on it and call up a dialog box. Further-
  53.     more, the template used for the dialog must be called ScreenSaverConfigure
  54.     to allow the main function to access it...
  55. */
  56. BOOL FAR PASCAL     ScreenSaverConfigureDialog  ( HWND, unsigned, WORD, LONG );
  57.  
  58. /* To allow the programmer the ability to register child control windows, this
  59.     function is called prior to the creation of the dialog box.  Any 
  60.     registering that is required should be done here, or return TRUE if none
  61.     is needed... */
  62. BOOL                RegisterDialogClasses       ( HANDLE );
  63.  
  64. /*
  65. There are only three other points that should be of notice:
  66. 1) The screen saver must have a string declared as 'szAppName' contaning the
  67.     name of the screen saver, and it must be declared as a global.
  68. 2) The screen saver EXE file should be renamed to a file with a SCR
  69.     extension so that the screen saver dialog form the control panel can
  70.     find it when is searches for screen savers.
  71. 3) If the executables window or instance are needed, they can be obtained
  72.     by the following definitions in the files that nedd them:
  73.  
  74.     extern HANDLE   hMainInstance;
  75.     extern HWND     hMainWindow;
  76. */
  77.  
  78. #define     WS_GT   ( WS_GROUP | WS_TABSTOP )
  79.