InitDialog.......
// TODO: Add extra initialization here
m_ImageList.Create(24,24,ILC_COLOR24|ILC_MASK,1,1);
m_ImageList.Add(LoadIcon(AfxGetResourceHandle(),MAKEINTRESOURCE(IDI_ICON1)));
m_ImageList.Add(LoadIcon(AfxGetResourceHandle(),MAKEINTRESOURCE(IDI_ICON2)));
m_ImageList.Add(LoadIcon(AfxGetResourceHandle(),MAKEINTRESOURCE(IDI_ICON3)));
m_ImageList.Add(LoadIcon(AfxGetResourceHandle(),MAKEINTRESOURCE(IDI_ICON4)));
m_OrgInfo.SetImageList(&m_ImageList,TVSIL_NORMAL);
HTREEITEM hProvince=m_OrgInfo.InsertItem("吉林省",0,0);
HTREEITEM hTown=m_OrgInfo.InsertItem("松原市",1,1,hProvince);
HTREEITEM hTown1=m_OrgInfo.InsertItem("白城市",1,1,hProvince);
m_OrgInfo.InsertItem("吉林市",1,1,hProvince);
m_OrgInfo.InsertItem("长春市",1,1,hProvince);
m_OrgInfo.InsertItem("扶余县",2,2,hTown);
m_OrgInfo.InsertItem("前郭县",2,2,hTown);
m_OrgInfo.InsertItem("长岭县",2,2,hTown);
m_OrgInfo.InsertItem("农安县",2,2,hTown);
m_OrgInfo.InsertItem("宁江区",2,2,hTown1);
m_OrgInfo.InsertItem("江宁区",2,2,hTown1);
m_OrgInfo.SetTextColor(RGB(255,0,0));//设置树视图控件文本颜色
void CDoesZoneDlg::IterateTree(HTREEITEM hItem)//递归遍历树视图控件选中的节点
{