sprintf(buf, "Chat Window %s", first.tidy);\r
SetWindowText(hDlg, buf);\r
}\r
- for(i=0; i<MAX_CHAT; i++) if(chatHandle[i] && i != partner) {\r
+ for(i=0; i<MAX_CHAT; i++) if(chatHandle[i]) {
+ if(i == partner) continue;\r
// set our button in other open chats\r
SetDlgItemText(chatHandle[i], IDC_Focus1+partner-(i<partner), chatPartner[partner]);\r
EnableWindow( GetDlgItem(chatHandle[i], IDC_Focus1+partner-(i<partner)), 1 );\r
// and buttons for other chats in ours\r
SetDlgItemText(hDlg, IDC_Focus1+i-(i>partner), chatPartner[i]);\r
- } else EnableWindow( GetDlgItem(hDlg, IDC_Focus1+i-(i>partner)), 1 );\r
+ } else EnableWindow( GetDlgItem(hDlg, IDC_Focus1+i-(i>partner)), 0 );\r
for(i=0; i<MAX_CHAT-1; i++) { Button_SetStyle(GetDlgItem(hDlg, IDC_Focus1+i), BS_PUSHBUTTON|BS_LEFT, TRUE); }\r
SetWindowPos(hDlg, NULL, wpConsole.x, wpConsole.y, 0, 0, SWP_NOZORDER|SWP_NOSIZE);\r
SendMessage( GetDlgItem(hDlg, IDC_ChatPartner), // [HGM] clickbox: initialize with requested handle\r