之後僅需使用CTreeCtrl::GetNextSiblingItem()來取得下一個相鄰的Leaf。
程式碼如下:
HTREEITEM hCurSelItem = this->m_TreeCtrl.GetSelectedItem();
//Update to UI
HTREEITEM hLeafItem = NULL;
hLeafItem = this->m_treRolesSetting.GetChildItem(hCurSelItem);
this->m_treRolesSetting.SetItemText(hLeafItem, "1st Leaf");
hLeafItem = this->m_treRolesSetting.GetNextSiblingItem(hLeafItem);
this->m_treRolesSetting.SetItemText(hLeafItem, "2nd Leaf");
No comments:
Post a Comment