PocketMatrix forums

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

Detect incoming call Gapidraw 2.0

Can someone please tell me the code to use in GapiDraw 2 to detect when the main window has lost it's focus.

I know gapidraw now allows you to answer the phone and things but I want my app to shut down completely when the phone rings or an alarm goes off etc.

Please help me, it is driving me mad.

I know it is something to do with the WindowProc bu t I am not really a c++ programmer so I don't really understand that stuff to well.

Thanx in advance.

Matt
This one is actually simple. Modify line 554 of GapiApplication.cpp:

Old code:
Code:
Minimize();


Change to:
Code:
Shutdown();


The simply set the config flag config.bMinimizeOnLostFocus to TRUE. Once your application loses focus (incoming call for example) it will shut down nicely...
Thankyou so much!!!!!! :D

I didn't know about the config thing!! Guess I should read the documentation a few more times!!!

Brilliant!!!

Matt