Problem with screensaver

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!

Put your screensaver file in:
C:\WINNT\System32\

  • VC6-OGL

And if that does not work what is the name of your screensaver and is the extension *.scr or is it mispelled.

  • VC6-OGL

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!

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.