Archived

This topic is now archived and is closed to further replies.

neonoblivion

stoping the screen saver

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites