INFO: Screen Saver Command Line Arguments

Windows communicates with Screen Savers through command line arguments. TheScrnSave.lib library handles this for Screen Savers that are written to useit, but other Win32 Screen Savers marked 4.0 or higher must handle thefollowing command line arguments:
   ScreenSaver           - Show the Settings dialog box.   ScreenSaver /c        - Show the Settings dialog box, modal to the                           foreground window.   ScreenSaver /p <HWND> - Preview Screen Saver as child of window <HWND>.   ScreenSaver /s        - Run the Screen Saver.
In addition, Windows 95 Screen Savers must handle:
   ScreenSaver /a <HWND> - change password, modal to window <HWND>				
<HWND> is a HWND presented on the command line as an unsigned decimalnumber.
More information
You need to create the preview window as a child of this window. It shouldcover the parent's entire client area.

You need to create the password dialog box as owned by HWND if it issupplied or as owned by the foreground window if HWND is not supplied.

Article ID: 182383 - Last Review: 06/22/2014 18:50:00 - Revision: 3.0

  • kbinfo kbscreensaver KB182383