stoping the screen saver

Started by
3 comments, last by neonoblivion 21 years, 2 months ago
how do you stop the screen saver from poping up? it comes up as usual during my program and changes the screen resilusion
Advertisement
Just don''t let DefWindowProc process the WM_SYSCOMMAND message.

In your window callback function add these lines :

case WM_SYSCOMMAND:
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}


I believe this will help.
Just don''t let DefWindowProc process the WM_SYSCOMMAND message.

In your window callback function add these lines :

case WM_SYSCOMMAND:
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}
break;


I believe this will help.
cool thanks one more thing along the same lines; how do you kill the startmenu?
You can disable the start menu when your opengl is in windowed mode by setting the cursor to only respond in your app. That way the user cant click on anything else. The Win32 command to do this is SetCapture and ReleaseCapture. After you call SetCapture for a window, the window captures mouse input that occurs while the mouse cursor remains within the window.

But why would you? I don''t really recommend doing this, if you are in full screen you wont need it, and if you are in windowed mode, it''s ''rude'' to impose control on any window other than yours.

-g

This topic is closed to new replies.

Advertisement