Access child nodes of SysTreeView32

前端 未结 1 1055
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-14 04:52

This is my next question following Hook into a child class SysTreeView32 of VBE window

I can access the SysTreeView32 now but I cant access the child node of the hN

1条回答
  •  遥遥无期
    2021-01-14 05:15

    This:

    childNode = SendMessage(hNode, TVM_GETNEXTITEM, 0&, 0&)
    

    Is not asking for a child node. Firstly, you're sending the message to hNode, not the tree control, which makes no sense at all. Then, to get the child node, you need to pass the TVGN_CHILD flag, which is 0x4, in wParam. You also need to pass the item you want the child of in lParam.

    So it would probably look something like this:

    childNode = SendMessage(hWndTvw, TVM_GETNEXTITEM, TVGN_CHILD, hNode)
    

    See the docs for the TVM_GETNEXTITEM message for more information.

    0 讨论(0)
提交回复
热议问题