Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,449 questions
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);