• How to get the coordinates (X,Y) of the top/left corner of a Node in a

    From Paulo@21:1/5 to All on Tue Nov 15 12:50:25 2016
    Hi All,

    I need to display a popup menu in the position of the selected Node of a TreeView control.
    Does anybody know how to get (via API) the exact coordinates (X,Y) of the top/left corner of a TreeView Node?

    TIA,
    Paulo
    --
    Classic VB!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Neila@21:1/5 to Paulo on Tue Nov 15 16:15:34 2016
    Doesn't Treeview have a Hittest method?
    ---
    On Tuesday, November 15, 2016 at 7:47:40 AM UTC-5, Paulo wrote:
    Hi All,

    I need to display a popup menu in the position of the selected Node of a TreeView control.
    Does anybody know how to get (via API) the exact coordinates (X,Y) of the top/left corner of a TreeView Node?

    TIA,
    Paulo
    --
    Classic VB!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paulo@21:1/5 to Neila on Wed Nov 16 11:11:54 2016
    "Neila" <david.marso@gmail.com> wrote:
    Doesn't Treeview have a Hittest method?

    The HitTest method returns the reference to a Node object located at given
    X,Y coordinates. I could use HiTest to check a grid of points X,Y around the TreeView control until to find a point inside the bounds of the Node cell. After a more carefull reading of the MSDN documentation I noticed the TVM_GETITEMRECT message that seems to respond to my needs. I found this nice piece of code: http://stackoverflow.com/questions/6726632/make-the-popupmenu-appear-at-the-selected-item-of-a-treeview-in-vb6

    Paulo
    --
    Classic VB!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)