c++ - How to determine if a process has GUI or not? -


how determine if process has responsive gui or rather it's background application? may there api function calls made?

(the answer doesn't has involve api calls)

the closest windows api call deduce information getguithreadinfo. note following paragraph remarks section:

if specified thread does not exist or have input queue, function fail.

a thread input queue can potentially own windows. note thread input queue not required create windows. note also, non-gui-thread can propagated gui-thread @ point.


note: though executable images specify subsystem, under run (e.g. console or windows), cannot used distinguish between process gui , 'background process'. process running in console subsystem can create gui well.


Comments