PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Today Screen plugin focus

I hate to crosspost this message, but I'm hoping for a quick answer...

I'm working on the final issue with Baseball Today before sending it through Beta testing, but at the moment I'm stumped.

Does anyone happen to know what WM_* message gets passed (if any) to a plugin when another plugin or another application gains focus? In other words, when the user is playing Baseball Today and he decides to use another plugin such as his contact list, I want to pause the game and suspend sound.

Thanks!
I am guessing that you've already tried this... but just to be sure... you should receive a WM_KILLFOCUS when you lose focus. In addition, you may or may not receive WM_ACTIVATE where LOWORD(wParam)==WA_INACTIVATE tells you that you should inactivate or != tells you to activate. In our game on PPC and Smartphone, we see a mixture of both, seemingly with little or no rhyme or reason.
Thanks rcp. I did try both of those methods but it appears the parent launcher is absorbing many of the messages I thought should be going to the child plugins. I'm looking at monitoring my WM_PAINT messages which should be coming in at 30 FPS to determine if I have lost focus (where no WM_PAINT events = no focus). Not the best method of doing this, but it appears to be my only option at this time. I don't think the Today Screen framework was designed with gaming in mind. :wink:

Here's a link to this thread in the GapiDraw forum, with a few screenshots of the game as it heads to Beta testing:

http://www.pocketmatrix.com/forums/viewtopic.php?t=17156