Wim Sterns wrote:
> Thanks for your answer.
> But what if my application did not start those apps.
> How can I get the windows handle in that case.
>
> I know that windows handles and process handles are
> two different things. Is there any way to get the
> windows handle if you know the process handle ?
> This would solve my problem...

Use the ToolHelp functions to get the ID of the process you're interested
in. Then call EnumWindows to search for a window with the given process
ID. Use GetWindowThreadProcessID to join the two.

Keep in mind that not all processes create windows. And some processes
create multiple top-level windows, none of which may be considered "the
main" window.

-- 
Rob


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to