��������: SetItemCheckBox ��������: bool ������Ϣ: bool _Selected ������Ϣ: CTreeNodeUI * _TreeNode ����˵��:
| 1089 | // ����˵��: |
| 1090 | //************************************ |
| 1091 | bool CTreeViewUI::SetItemCheckBox( bool _Selected,CTreeNodeUI* _TreeNode /*= NULL*/ ) |
| 1092 | { |
| 1093 | if(_TreeNode) |
| 1094 | { |
| 1095 | if(_TreeNode->GetCountChild() > 0) |
| 1096 | { |
| 1097 | int nCount = _TreeNode->GetCountChild(); |
| 1098 | for(int nIndex = 0;nIndex < nCount;nIndex++) |
| 1099 | { |
| 1100 | CTreeNodeUI* pItem = _TreeNode->GetChildNode(nIndex); |
| 1101 | pItem->GetCheckBox()->Selected(_Selected); |
| 1102 | if(pItem->GetCountChild()) |
| 1103 | SetItemCheckBox(_Selected,pItem); |
| 1104 | } |
| 1105 | } |
| 1106 | return true; |
| 1107 | } |
| 1108 | else |
| 1109 | { |
| 1110 | int nIndex = 0; |
| 1111 | int nCount = GetCount(); |
| 1112 | while(nIndex < nCount) |
| 1113 | { |
| 1114 | CTreeNodeUI* pItem = (CTreeNodeUI*)GetItemAt(nIndex); |
| 1115 | pItem->GetCheckBox()->Selected(_Selected); |
| 1116 | if(pItem->GetCountChild()) |
| 1117 | SetItemCheckBox(_Selected,pItem); |
| 1118 | |
| 1119 | nIndex++; |
| 1120 | } |
| 1121 | return true; |
| 1122 | } |
| 1123 | return false; |
| 1124 | } |
| 1125 | |
| 1126 | //************************************ |
| 1127 | // ��������: SetItemExpand |
nothing calls this directly
no test coverage detected