void RemoveRecursivce(Upp::Ctrl *ctrl) { if(ctrl == NULL) { return; } for(Upp::Ctrl *_ctrl = ctrl->GetFirstChild(); _ctrl; _ctrl = ctrl->GetNext()) { RemoveRecursivce(_ctrl); if(_ctrl != NULL) { ctrl->RemoveChild(_ctrl); } } }
[Updated on: Mon, 24 July 2023 22:02]
Report message to a moderator
void RemoveRecursivce(Upp::Ctrl *ctrl) { if(ctrl == NULL) { return; } while(ctrl->GetChildCount()) { Upp::Ctrl *tctrl = ctrl->GetIndexChild(ctrl->GetChildCount() - 1); if(tctrl->GetChildCount()) { RemoveRecursivce(tctrl); } else { ctrl->RemoveChild(tctrl); } } }