[SDL] Re: Crossplatform screensavers

Ben Campbell ben.campbell at cyberlife.co.uk
Sat Apr 22 10:26:56 PDT 2000


fmunoz at geocities.com wrote:
> 
>  I wonder if somebody tried it before... a basic code to
> create simple screen savers using SDL.
> 
>  Linux is easy (just add the hack to the xscreensaver list, or tweak
> some of the old code), in Win the only data I
> had found is that *.scr are *.exe renamed and I have not clue about
> Macs.
> 
>  Can anybody more skilled than me give some tips about that topic?

I think that win32 screensavers are prettymuch standard apps, but there
are some special commandline options the system uses to invoke them.

Did a quick search of the Microsoft knowledgebase, and found article
Q182383 with some more details. At the risk of being sued by MS, I've
pasted it below.

Hope it's interesting,
Ben.


Q182383
------------------------------------------------------
INFO: Screen Saver Command Line
   Arguments



  The information in this article applies to:

       Microsoft Win32 Software Development Kit (SDK) 
       Microsoft Windows 2000



  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. 

  Additional query words: 

  Keywords : kbNTOS kbWinOS2000 kbScreenSaver kbSDKWin32 kbGrpUser
  kbWinOS 
  Version : WINDOWS: 
  Platform : WINDOWS 
  Issue type : kbinfo 

---------------------------------------------------------------------------------------



More information about the SDL mailing list