28,658 questions
Send the control a TVM_GETNEXTITEM message with TVGN_PARENT
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Folks:
Developing on Win 11 Pro, Visual Studio 2021 Community, C++, Win32 no MFC.
Given an HTREEITEM, how do I find it's parent's HTREEITEM?
Thanks
Larry
Send the control a TVM_GETNEXTITEM message with TVGN_PARENT
Use macro in the <commctrl.h>
HTREEITEM hTreeItemOfParent = TreeView_GetParent( hWndTreeCtrl, hTreeItemChild);