HandleFromCursor not working as expected

Since I have several renderers and cannot use their own Mouse output, I am looking at HandleFromCursor. I use the window handles to set position and show/hide renderers anyways, so it makes sense.

What I noticed though is something unexpected. Only the title bar of the window has the Window Handle from the list of vvvv windows. The main patch area has a totally different handle and for example in the case of Herr Inspektor has about 6 different handles, depending what part of it you have the mouse over.

For any other software it shows the same handle regardless if I am over the title bar or not (eg. like in Firefox that I am using right now).

Also noticed that after leaving the attached patch open for a while and going over different windows, vvvv will eventually crash.

This is on Windows 10 and with vvvv35.8 64bit.

Is there a way to get the window handle that is shown in WindowLists when I hover over any part of a vvvv window/renderer?

handle_from_cursor.v4p (4.6 KB)

not sure if it makes a difference but have you tried HandleFromPoint (Windows)?

HandleFromCursor is not vanilla or addonpack vvvv but part of mp.essentials returns the actual handle of a form element under the cursor, not necessarily the window handle. What you’re experiencing in vvvv is the result of how vvvv gui is constructed out of multiple forms. Different software has different drawing methods that’s why the behavior can be different. So there’s the window handle, then the child of that is the form/activex area stretching over the entire window, then the IOBoxes are children forms of that area and so on. There’s a GetParent node to get the handle of the parent element of an input handle. If the input is a window handle then its parent handle will be 0.

If you want to get which app is below the cursor and what handle’s it has you can use PID (Windows Handle) and Handle (Windows PID) nodes like this:

HandleFromCursor served me good for years without any crashes caused by it whatsoever, are you 100% sure that the crash is indeed caused by that node? I had more crashes with WindowLists for example ;) :P

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.