I'm developing a small utility application that needs to detect whether another one has one of its MDI child windows open (it's an off-the-shelf Win32 business application over which I have neither source code nor control). From my app, I would like to be able to poll or detect when a particular MDI Child window is open.
In .Net, it's easy to iterate over running processes, but I haven't found an easy way to iterate through the (sub)windows and controls of a given Win32 process from .Net.
Any ideas?
Update
Thanks for the answers they got me on the right path.
I found an article with a test project that uses both EnumWindows
and EnumChidWindows
and other API calls to get extended information on controls.