Larry,
Almost done :) Enumthreadwindows gets all top windows as you said. One thing to overcome.
CreateProcess doesn't return a valid threadid 2nd time it's called (with an app like word). Returned dwThreadID is not locatable with Spy++ too. If I keep the first call's threadID and use it then EnumThreadWindows returns all window handles (document1, document2).
Cetin
>Cetin,
>Since you are working with FLLs and such, you may be able to implement EnumThreadWindows (it requires a callback function). This will give you the handle to all windows assocaited with the thread. If you use CreateProcess to create the process, the PROCESS_INFORMATION structure is filled with the thread ID to use with this function.
>
>HTH.