如何遍历一个节点对象的兄弟节点? 请问如何遍历一个节点对象的兄弟节点? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 获得父节点,GetParent等,然后获得GetChildAttribute等获得所有子节点... MSXML2::IXMLDOMNode::GetnextSibling(); MSXML2::IXMLDOMNode::GetpreviousSibling(); int Traversal_SiblingItem(HTREEITEM hTreeItem){ int CurItem_index = 0;//当前所选节点序号 if (hTreeItem == NULL) {//本节点就为空 return 0; } while(hTreeItem) { CurItem_index++; //此处添加你的操作 //Dosomething(); //以下三行测试用 CString str_CurItem_index; str_CurItem_index.Format("%d",str_CurItem_index); AfxMessageBox(str_CurItem_index); hTreeItem = m_tree.GetPrevSiblingItem(hTreeItem); } return CurItem_index; //返回兄弟节点总数} VS设计combo box 组合框问题 急求一个CFindReplaceDialog的应用例子 OnInitDialog中对控件MoveWindow出错 自绘的CSplitterWnd中重写RecalcLayout有什么用? CBitmapButton不显示图片到底为什么? 刨根问底 抓屏之后如何把图片放大? 怎样隐藏桌面? 能不能做一个虚拟打印驱动程序?怎么样实现? 想要使listctrl的不同的列都可以编辑,就好像表格一样,能实现吗?? cmake opencv 用ADO连接的MySQL,客户端自己怎么知道用的是什么IP连接的服务器 如何让控件点击无效?
MSXML2::IXMLDOMNode::GetnextSibling();
MSXML2::IXMLDOMNode::GetpreviousSibling();
int Traversal_SiblingItem(HTREEITEM hTreeItem)
{
int CurItem_index = 0;//当前所选节点序号
if (hTreeItem == NULL)
{//本节点就为空
return 0;
}
while(hTreeItem)
{
CurItem_index++;
//此处添加你的操作
//Dosomething(); //以下三行测试用
CString str_CurItem_index;
str_CurItem_index.Format("%d",str_CurItem_index);
AfxMessageBox(str_CurItem_index); hTreeItem = m_tree.GetPrevSiblingItem(hTreeItem);
} return CurItem_index; //返回兄弟节点总数}