the following codes are used in MFC,I forget the default function parameter,but you can change it according your command!
-------------------------------
CWnd *pwndChild=GetWindow(GW_CHILD)//get the first control
while(pwndChild)
{
// verify the child window
......
//get the next control
pwndChild=pwndChild->GetNextWindow();//the default parameter has been omited
}