How to enumerate all top-level windows?
I know WinAPI implementation to get the handles of all top-level windows, but is it possible to do the same thing using Qt?
My ultimate goal is that I need to send keystrokes to the 3-rd party application. So my follow-up question will be (assuming that I can get the handle to the top window Qt-way): how to send keystrokes from Qt app to another application's window?
Re: How to enumerate all top-level windows?
If you know how to do it with WinAPI, why are you looking for a different solution? Qt doesn't spy on other applications.
Re: How to enumerate all top-level windows?
wysota:
The reason I am looking for Qt-way of doing it is the same reason I am doing Qt at all. The enumeration of processes, top-level windows and similar actions are generic enough to be abstracted in multi-platform solution such as Qt.
Re: How to enumerate all top-level windows?
No, they are not generic at all. Windows is the only platform that allows to spy and manipulate other processes like that. Other platforms don't have such concepts.