PDA

View Full Version : Problem with screensaver



fcoutel
01-09-2003, 01:42 AM
Hi!

Can somebody please help me with a screensaver. I have created a basic scene with a moving sphere with logo on it. I used the scrnsave.lib. All is fine when I test it (MB3 on file -> Test) it appears fine. I have copied my .scr file into C:WINNT where all my other screensavers are BUT it does not appear in the list of screensavers from Desktop->Properties->Screensaver, why???

I can send the code (only a few files) if required (let me know what your email is).

Thanks!

Stack Overflow
01-09-2003, 07:23 AM
Put your screensaver file in:
C:\WINNT\System32\

- VC6-OGL

Stack Overflow
01-09-2003, 07:31 AM
And if that does not work what is the name of your screensaver and is the extension *.scr or is it mispelled.

- VC6-OGL

fcoutel
01-09-2003, 07:36 AM
I have found the solution of the problem looking at another code example: the solution is to add the following .DEF file into the project with the following in it

NAME OPENGL.SCR

DESCRIPTION 'SCRNSAVE : OPENGL'

HEAPSIZE 1024
STACKSIZE 4096

EXPORTS
ScreenSaverProc
ScreenSaverConfigureDialog

After I compiled it again I did MB3-> install and this installed the file in C:WINNT.

If somebody can explain me why I need the .DEF file that would be great!

Deiussum
01-09-2003, 11:39 AM
Among other things, the def file exports the two functions used by the Screensaver library. One is for calling your screensaver's message handler, the other is for calling the configuration dialog's message handler. You also need a specific value for the configuration dialog resource, as that's what the Screensaver library expects to use.