C++ Parent Of A TreeView Item?

a_unique_name 401 Reputation points
2024-03-22T13:31:39.6633333+00:00

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

Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. uncle_Kei 40 Reputation points
    2024-03-25T02:00:57.12+00:00

    Use macro in the <commctrl.h>

    HTREEITEM hTreeItemOfParent = TreeView_GetParent( hWndTreeCtrl, hTreeItemChild);

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.