GetForegroundWindow() api not working properly

  • Thread starter Thread starter fighterphilip
  • Start date Start date
F

fighterphilip

Guest
Hi All,

Our Windows service application contains one exe running on each user sessions. And all these exes are developed with VC++, Visual Studio 2012. On user session based exe we are trying to find the active window in a machine using GetForegroundWindow() and it works fine on windows 7,8.1,10. The user session based application will restarts on every one hour period. Sometime the application shows its own process id after restart, but the focus is on some other window. So GetForegroundWindow() is not useful at that time

Anyone can suggest any other method for capturing the active window for the above scenario.

Thanks in advance.

ANTU PHILIP

Continue reading...
 
Back
Top