temporarily disable screensaver(s) on various plattforms? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Knows some wx things
Knows some wx things
Posts: 32
Joined: Wed Nov 12, 2008 7:04 pm

temporarily disable screensaver(s) on various plattforms?

Post by smf » Thu Apr 23, 2009 11:03 am


I would like to know how (if) I can temporarily disable the most common screensavers with wxWidgets?

As it is a multi-plattform-media-app (Linux+Windows, maybe MacOS sometime), displaying some images/movies, it would be desirable to switch of the screensavers of at least these systems/platforms, while data is displayed:


Is that possible at all? If it is not possible with wxWidgets directly has anyone good pointers to information of how I can check if any of these is/are running and how to temp. turn it off?


wxWorld Domination!
wxWorld Domination!
Posts: 1059
Joined: Sun Dec 30, 2007 6:40 pm
Location: Canada

Post by JimFairway » Sun May 03, 2009 8:33 pm

Hi Stefan,

On Windows you should be able to call

Code: Select all

SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, false, 0, 0);

to disable the screen saver. Change the false to true turn it back on.

See http://msdn.microsoft.com/en-us/library/ms724947.aspx

Hope that helps,

OS: Vista SP1, wxWidgets 2.8.7.

Post Reply