this is a utilty i started to wrote to some application with many floating windows, (the app didn't gave much ability to handle them).
then it become a general purpose utilty, it can work with any running application.
I always try to use only API, because i always have "convert basic to other language" in mind, so there are many APIs here.
please fill free to post any comment you like.
Last edited by whatsup; May 2nd, 2010 at 02:42 AM.
Reason: Removed Compiled EXE from attachment
this is a utilty i started to wrote to some application with many floating windows, (the app didn't gave much ability to handle them).
then it become a general purpose utilty, it can work with any running application.
I always try to use only API, because i always have "convert basic to other language" in mind, so there are many APIs here.
please fill free to post any comment you like.
Good one Spy, have been trying this line of coding for sometime now (when ever I get it).
I am new here, I hope that I am allowed to modify the code to my liking.
WhatsUp, works great but it would be nice to have the information in other places. Do you want me to update program or do you may feel free to add the following. I have only done the basics right now?
To get information for window displays from handles (ALL Window and Application Windows TAB)
Since there might be multiple windows associated with a single process ID, we will need to deteremine the owner of the process ID. Then we will be able to determine the unique parent process. I have just started to look into this but someone else out there might have already determined how to perform this function.
do you mean if a window has childs , each child has the same process ID ?
if so, this is already handled.
Yes this is what I mean but you can see in SPY++ that only one of the processes is the owner and all the other process which shares the same process ID all point to the common owner.
no, you can see which is child, on the child coloumn
there can be two or more none-childs in one app
and all these windows are with the same Process ID
i'll check if i can give more details about what is the main window.
Found what I was looking for GETWINDOW(hWnd,GW_OWNER) where GW_OWNER=4. This function will return the owner of each handle. Since you could have every process without a parent indicator you can use this to determine the main window in the group. Sometime it may be invisible in the listing. Hopefully this is the last key I needed, all I need to do now is create an algorthm which puts all the information together and presents it back to the user in a simple form.
this will give you only the immediate owner, not the top most window of the app.
PSpy has a function to get the top most window, and in app mode, it shows the title of that top most
in the header.
i updated now with:
the handle number of the topmost window is display along with the title
in the process tab:
parent name column, so you can see the parent name of each process along with its ID number
the last updates before these were:
in the windows tab:
process column
kill process tree
i think you can find every thing you need in the code.