1
Automation Interface, Add-Ins and Tools / Get EA main window handle or PID of running EA
« on: April 30, 2011, 10:24:29 pm »
Hello,
For specific reasons I need to get window handle to main EA window, that shows up after using Repository.ShowWindow() function.
I could do this by calling FindWindow() or GetForegroundWindow() from WinAPI, but this would cause problems if more instances were running (or windows with similar titles).
I wanted to know if there is some built-in way to retrieve the window handle (or at least process ID) of the current EA process started by Automation Interfaces.
If there is not a way to do this, I would like to hear suggestions of possible workarounds.
I am looking forward for your replies,
Markos
For specific reasons I need to get window handle to main EA window, that shows up after using Repository.ShowWindow() function.
I could do this by calling FindWindow() or GetForegroundWindow() from WinAPI, but this would cause problems if more instances were running (or windows with similar titles).
I wanted to know if there is some built-in way to retrieve the window handle (or at least process ID) of the current EA process started by Automation Interfaces.
If there is not a way to do this, I would like to hear suggestions of possible workarounds.
I am looking forward for your replies,
Markos