if(FindWindow(NULL, winTitle) != NULL) { MessageBox(0,"Already managing this this client","Error",MB_OK); EndDialog(hwnd, 0); strcpy(winTitle, ""); }