Script Dialog : Determine clicked column in a ListView control

Good day.
Is there any way to determine in which column a double-click occurred on a ListView item? Just to clarify—I don’t mean the row number, but the column within that row, assuming the control is set to select the entire row.

I’ve tried using the mouse coordinates via msg, then converting them with Dlg.ScreenToClient() to get an X point relative to the dialog window.
After a few calculations based on the known position of the ListView and their column widths, it's possible to estimate the column number with decent accuracy.

The issue happens when the ListView’s content is horizontally scrollable and the view is scrolled to the right. There's no way to determine if the firsts columns are currently off-screen, which breaks the calculation.

Is there any way to get this information? I assume that functionality isn’t currently available in DOpus dialogs?

Thanks in advance.

Btw, I found a similar question/response but for C#, in case that's somehow relevant

I think there’s also a Control.ScreenToClient which may help, but I’m not sure if it’ll account for scrolling or not (depends how the control itself works).

Thanks Leo. I'll just try using that method with both the control's x and y coords, and the mouse position obtained from msg, but it does not seem to throw any relevant info for this specific scenario.

FWIW, I was trying to build an editable ListView so that, based on whichever column the user double-clicks, a control is positioned in that area, ready for receive the new value and then pass it to the related edited column value. It works well except in the case already described—when the columns are scrolled all the way to the left.

Perhaps the double-click event for a ListView could also provide the column number, if the full row select is enabled?