PDA

View Full Version : Screensaver



vonsatan
09-18-2001, 02:43 AM
Hey, how do i disable the screensaver in windows? (sorry for the non-opengl Q!)

Bob
09-18-2001, 02:50 AM
Select 'None' as screensaver maybe...

vonsatan
09-18-2001, 02:53 AM
i mean ...within my app, not in the display settings...i just want to disable it whilst doin my rendering etc etc....so the screensaver doesnt pop up when i leave my app sitting for a while.

MButchers
09-18-2001, 11:46 PM
hi there,

you have to tell windows a screen saver
is already running with a call to

SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(enabled), @OldValue, 0);

Hope it helps

Mark

Overmind
09-19-2001, 09:37 AM
The system sends you a WM_SYSCOMMAND message with wParam == SC_SCREENSAVE when the screensaver is about to be activated. When you return zero the screensaver is started, otherwise it is not. That doesn't work with MFC OnSysCommand because you cannot return nonzero there.