PocketMatrix forums

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

GAPI and trapping buttons

I'm currently writing an app using two hardware buttons. To get WM_KEYDOWN message of buttons, I've used GAPI functions and it worked.

My problems is that GAPI is trapping another buttons which I don't need, too. How can I leave those buttons to work as their original purpose when trapping my buttons?

Thanks in advance.
You could always check to see if the button is one you need hooked, and if it isn't, use PostMessage to send it to the foreground window. Probably not the best solution, but it should work in most cases.
usually the game is the foreground window...isn't it?
Malmer wrote:
usually the game is the foreground window...isn't it?

I believe that he is refering to the window that certain button brings up (like the record button brings up the record window). He says to send that window to the front (I think).
I was thinking of it in the context of an app with no visible window or one that is always on top. At any rate, the same theory applies, only you have to get the window under yours. There is a function that does that somewhere...

I think in the case that you want to let the OS launch the app associated with the button, you could just post the message to NULL ( I guess... never tried to post a global message, so I don't know what it does ).