Access child nodes of SysTreeView32

最后都变了- 提交于 2019-12-01 09:05:14

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!