2020/05/29
[MFC] TreeCtrl 전체 노드 확장하기
// 전체 Tree 확장 std::function< void (HTREEITEM) > ldExpand = [&](HTREEITEM hItem) { if ( m_treeLibrary.ItemHasChildren(hItem) ) { m_treeLibrary.Expand( hItem, TVE_EXPAND ); HTREEITEM hChild = m_treeLibrary.GetChildItem(hItem); if ( hItem != nullptr ) ldExpand(hChild); } hItem = m_treeLibrary.GetNextSiblingItem(hItem); if ( hItem != nullptr ) ldExpand(hItem); }; HTREEITEM hRootItem = m_treeLibrary.GetRootItem(); ldExpand(hRootItem);
Subscribe to:
Posts
(
Atom
)