CWnd* pwndChild = GetWindow(GW_CHILD); while (pwndChild) { //....to do sth. pwndChild = pwndChild->GetNextWindow(); }