Jump to content
  • Advertisement
Sign in to follow this  
L. Spiro

Alt Key Freezes Game Window (Windows)

This topic is 3060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This happens on any Windows window without a menu. Pressing the Alt key freezes the window until you press it again or click somewhere. In the message pump, my game will tick and render a frame whenever there are no pending messages. After pressing Alt, the game stops ticking and rendering. This basically means the message pump is being flooded with windows messages until pressing Alt again or clicking somewhere. Normally Alt acts on the menu of the window, and since my game window has no menu, there is clearly some kind of conflict causing the window to be spammed hardcore after pressing Alt. You can see this same effect on any demo in the Microsoft® DirectX® SDK samples. Press Alt and all animations stop. How can I fix this? Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Is it possible for you to capture the WM_KEY*** message for the Alt key...and just "eat" the message...thereby removing it from the windows message queue ?

Just a thought.

Share this post


Link to post
Share on other sites
If you mean to eat the message that tries to show the menu, that may be possible, but I would like to hear some more ideas because that is going to interfere with one of my upcoming features.

If that is the only way then I can handle it, but my code will have to get a little messy, so I am hoping for some alternatives first.


Thank you for your reply.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!