Turn off screensavers. Note that this won't work on Vista+ when there's a password.

This commit is contained in:
Henrik Rydgard committed 2013-05-02 20:58:50 +02:00
1 parent 51493ab8cb
commit 0ccebacbd6
1 file changed
+15
+15
View File
@@ -746,6 +746,21 @@ namespace MainWindow
UpdateMenus();
break;
// Turn off the screensaver.
// Note that if there's a screensaver password, this simple method
// doesn't work on Vista or higher.
case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
return 0;
case SC_MONITORPOWER:
return 0;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}