Page 1 of 1

Process by window handle

Posted: Mon Dec 20, 2021 9:58 am
by Natter
Hi,

Is it possible to get the process object to which it belongs by the window handle ?

Re: Process by window handle

Posted: Mon Dec 20, 2021 11:42 am
by hmpaquito
oWndFromHwnd()

Re: Process by window handle

Posted: Mon Dec 20, 2021 12:28 pm
by Natter
What does oWndFromHwnd have to do with it ?
I'm looking through the Enum list of windows and wanted to find out which process a particular window belongs to

Re: Process by window handle

Posted: Mon Dec 20, 2021 12:35 pm
by Antonio Linares
You have to use: GetWindowThreadProcessId()

https://webcache.googleusercontent.com/search?q=cache:iBU-5nGz4kMJ:https://www.py4u.net/discuss/705611+&cd=4&hl=en&ct=clnk&gl=es

There are three different solutions on the above url