Setting the front most window using accessibility API
问题 I want to set a certain window, from an external app (for example textedit), to be front most. I can successfully get a reference to the app itself using GetFrontProcess, and check whether it is front most. If it is not, I can use setFrontProcess to make it focussed. I can then use the the accessibility API to examine all the windows under that application. I am checking that a certain window exists, and if so I compare it against the front most window of the application: //get the front