Skip to main content
GameDev.net gamedev.net
🔒 Locked

ScreenSavers

Started by Wiz74 Oct 11, 2000 at 12:46 AM 8 replies 650+ views
Original Post
Wiz74
Wiz74
Hi all, was simply wodering how I make a screensaver from one of my exe''s. I am developing in Visual C++ v5. Thank you all in advance. Just another Corporate slave trying to release himself into the OpenGL void.
Just another Corporate slave trying to release himself into the OpenGL void.
dwarfsoft
dwarfsoft
Um, you need to program it as a screen saver from the begining. Check MSDN for the specifics on that and see if you can find any of the sample code in the source directories. Thats about all the help that I can offer you

-Chris Bennett of Dwarfsoft - Site:"The Philosophers' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
          
DemOSh
DemOSh
unfortunately imo what msdn provides as far as screensavers go is almost useless... check out this page here. If link dosnt work, heres the url: http://www.wischik.com/scr/howtoscr.html

~DemoSh
Wiz74
Wiz74
Thank you both very much.
Just another Corporate slave trying to release himself into the OpenGL void.
soreno
soreno
Hiya

What you need to do is to make sure that only one instance of your exe can be run. I use the following code to do that:
//RunOnce only
HANDLE hMutex = CreateMutex (NULL, TRUE, argv[0]);
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
CloseHandle(hMutex);
exit(0);
}

Then you need to pickup the commandline parameters windows uses when executing your exe (of course renamed to scr, but it''s the same).
/c - Show the Settings dialog box, modal to the foreground window.
/p - Preview Screen Saver as child of window .
/s - Run the Screen Saver.
/a - Change password, modal to window .

I have yet found out how to do preview, password and settings. However my screensaver don''t need them so no point in wasting time for such a luxury problem..
Settings should be easy.. i think =)

Søren Olesen
Denmark
soreno
soreno
Ups sorry didn''t check out link (http://www.wischik.com/scr/howtoscr.html)...
Buster
Buster
One very easy way to do it is rename yourprog.exe to yourprog.scr and boom! You''re done.

However, you should really do it the proper way using the screen saver library. You can read about it in the msdn docs.
soreno
soreno
Hiya.

I''ve tried that... and boom! my system resources just dropped rapidly.. (windows starts multiply instances of the screensaver)
You need to be sure that only one instance of your program is allowed..

Søren Olesen
Denmark
delta_z
delta_z
I highly recommend this link! I''m using his source to build my screen saver in OpenGL and it''s the best I''ve seen so far. It''s German but that don''t matter. I got mine compileing and running so if you need more help let me know.

http://members.aol.com/vjfrost/ss/wirecube.zip
Chad Schmidt
fshana
fshana
I''ve written a screensaver skeleton on my page: http://www.cornflakezone.com, replace the drawing code with your own and you''re done. Enjoy,
fs

mainflake@cornflakezone.com
http://www.cornflakezone.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.