UINT nstate = GetTreeCtrl().GetItemState(hParentS, TVIS_EXPANDED); if ((nstate & TVIS_EXPANDED) != 0) //展開的 {}