Situation :
- a VB app which contains a treeview (mscomctl.ocx) on a form
- a C++ dll which is subclassing the treeview
When the C++ dll receives a message, like TVM_SELECTITEM, it receives a HTREEITEM which identifies the node.
I can get a TVITEM structure of the node at this point, that gives me additional information, including the lParam field, which seems to be unique for each node.
I need the subclass to call ocx-methods on the node. This requires me to know the key or index of the node in the Nodes collection.
Her is the problem, I can't figure out how to get the key or index of the node from the HTREEITEM or lParam.
Any help greatly appreciated,
Marcel
- a VB app which contains a treeview (mscomctl.ocx) on a form
- a C++ dll which is subclassing the treeview
When the C++ dll receives a message, like TVM_SELECTITEM, it receives a HTREEITEM which identifies the node.
I can get a TVITEM structure of the node at this point, that gives me additional information, including the lParam field, which seems to be unique for each node.
I need the subclass to call ocx-methods on the node. This requires me to know the key or index of the node in the Nodes collection.
Her is the problem, I can't figure out how to get the key or index of the node from the HTREEITEM or lParam.
Any help greatly appreciated,
Marcel