C++ Parent Of A TreeView Item?

a_unique_name 381 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

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,570 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,086 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. uncle_Kei 0 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