Sign in to follow this  
shoggoth

Stopping screen saver activating on windows?

Recommended Posts

Hello I've put the following code in my event loop as advised but the saver still comes on (and locks the machine). Any ideas? Cheers
	// Process Window Message Callbacks
	switch (uMsg)														// Evaluate Window Message
	{
		case WM_ACTIVATE:												// Window activation or deactivation event
			active = !HIWORD(wParam);									// Check if the app. is minimised
			return 0;

		case WM_SYSCOMMAND:												// Intercept System Commands
		{
			switch (wParam & 0xfff0)									// Check System Calls
			{
				case SC_SCREENSAVE:										// Screensaver Trying To Start?
				case SC_MONITORPOWER:									// Monitor Trying To Enter Powersave?
				return 0;												// Prevent From Happening
			}
		}
		break;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this