//Clear the list box SendDlgItemMessage(hwnd, IDCLIST, LBRESETCONTENT, 0, 0); //Display the best robots to the dialog window (list box) for(m=0; m