Game Development Community

Rc1: Ws_sysmenu?

by Adam Johnston · in Torque Game Builder · 06/01/2006 (4:41 pm) · 5 replies

I'm not sure about this.
You have changed the window initialization from:

windowStyle |= ( WS_OVERLAPPED | WS_CAPTION );

to:

windowStyle |= ( WS_OVERLAPPEDWINDOW | WS_CAPTION | WS_SYSMENU );

now the problem is whenever I hit [ALT] my game uses this
my game freezes, I have code to freeze in losing focus, so I reverted
to the old declaration.

There is some reason for not doing this?
Thanxs.

#1
06/01/2006 (4:54 pm)
I searched the forums and found that the Windows sysmenu grabs the alt key input and blocks the process. See this thread if you have access to it:
www.garagegames.com/mg/forums/result.thread.php?qt=439

Quote:Yup common problem, and you thought windows was multitasking eh? :) Basically the way Microsoft has written their gui if ANY menu associated with your application is visible the peekMessage calls become blocking. The only possible way to get around this that I am aware of is to have a separate thread handle all your windowing and another that just runs your game. I have been meaning to try this for some time now to see if there are any unknown gotchas but just never gotten the free time. If you give it a spin let me know how well it works for you.
#2
06/02/2006 (5:17 am)
I noticed my game was doing the same thing. I tried the code at the end of that page and it worked perfectly. Is there a technical reason why this hasn't been implemented in the TAP yet?
#3
06/02/2006 (9:27 am)
Thank you Alex!
these thread has a nice suggestion that I tryed and worked
now my icon is visible and the game doesn't frezees
#4
06/02/2006 (10:37 am)
I just noticed that RC1 was the first T2D build that featured the new window style.. that would explain why it hasn't been implemented yet. :)

By the way, the issue with the icon not appearing in the upper-left hand corner of the window is related to Visual Studio not updating the resources. I believe you have to delete the .APS files in order to get the icon to appear correctly.

I had to delete the APS files, remove the icons from the project (and delete them from the hard drive), and then add new icons.
#5
06/02/2006 (10:20 pm)
Hey Guys,

Thanks for the heads up on this issue. The sizable window change was a last minute addition that we believed added great usability to the tool. You can now stretch your screen across multiple monitors and have it at non-standard resolutions for fitting it 'just right' onto your desktop. Hope you all find it as useful as we have!

I've implemented the Window message handling fix and it will be in the release.


Cheers,
-Justin