Archived

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

PHRICTION

Win32: Dumb question but...

Recommended Posts

I am embarrased to ask this, but I cannot find any explanation. I have an app that calls SetWindowLong GWL_STYLE to change the window style. Im learning Direct3D and its going from fullscreen, to windowed. Everything seems to work perfectly, except I always hear a windows default sound when it is called. But that isn''t all. I only hear it when SetWindowLong is called with WS_SYSMENU. There are no errors; I check the return value, and GetLastError, along with checking the return values of all the other major API calls in program. And I am fairly positive that it is caused by SetWindowLong. Again, the every thing looks like it works perfectly. It goes into windowed mode without any hitches, but that beep is making me paranoid. Any ideas?

Share this post


Link to post
Share on other sites
Are you using a keypress to switch modes? I don''t remember why, but I remember getting that before and it turned out to be that I was pressing some sys key that just happened to generate a "don''t do that" sound completely separate to whatever I was doing.

If you step over the code in the debugger, do you still get it?

Share this post


Link to post
Share on other sites
Hmm. If I step over SetWindowLong I am still getting the beep. I am using a keypress. I want it to toggle to fullscreen on an ALT-ENTER.

Here is the code in my window procedure:


case WM_SYSKEYDOWN:
//--------------------------------------------

//Fullscreen toggle

if( (lParam & 0x20000000) && (wParam == VK_RETURN) )
{
if( !D3DCode.MakeFullScreen() )
{
exit(EXIT_FAILURE);
}
}
break;


D3DCode being a class containing all the direct3d stuff in my app. I am not positive if that is the correct way to process a alt-enter. I do only get the beep going from fullscreen to windowed, and not fron windowed to fullscreen.

Thanks for the response.

edit: sorry, forgot the source tags. edit2: coherence. =)

[edited by - phriction on August 13, 2003 1:00:20 AM]

[edited by - phriction on August 13, 2003 1:04:16 AM]

Share this post


Link to post
Share on other sites