How to know when user switches between two different application?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
nandakishore
Experienced Solver
Experienced Solver
Posts: 57
Joined: Wed Feb 25, 2015 2:09 pm
Location: Chennai, India

How to know when user switches between two different application?

Post by nandakishore » Fri Mar 24, 2017 6:12 am

Hi ,
i have a situation like there are two applications open in my desk one is wxWidgets app other is any normal app.
If user switches between these two apps how to know from my wxWidgets app that the focus of wxWidgets app is gone?
Got a Problem???..No worry..Focus on Solution not on Problem :P

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2057
Joined: Sun Jan 03, 2010 5:45 pm

Re: How to know when user switches between two different application?

Post by PB » Fri Mar 24, 2017 6:55 am

Have you tried to Bind the wxEVT_ACTIVATE_APP event in your application: http://docs.wxwidgets.org/trunk/classwx ... event.html

There is also wxApp::IsActive() method.

Post Reply