INFO: Screen Saver Command Line Arguments

Last reviewed: March 12, 1998
Article ID: Q182383
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

    - Microsoft Windows NT 4.0

    - Microsoft Windows 95

SUMMARY

Windows communicates with Screen Savers through command line arguments. The ScrnSave.lib library handles this for Screen Savers that are written to use it, but other Win32 Screen Savers marked 4.0 or higher must handle the following 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 decimal number.

MORE INFORMATION

You need to create the preview window as a child of this window. It should cover the parent's entire client area.

You need to create the password dialog box as owned by HWND if it is

supplied or as owned by the foreground window if HWND is not supplied.

Keywords          : GdiScrSav
Version           : WINNT:4.0;WIN95
Platform          : Win95 winnt
Issue type        : kbinfo


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 12, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.