{\r
static SnapData sd;\r
char buf[MSG_SIZ], mess[MSG_SIZ];\r
- int partner = -1, i;\r
+ int partner = -1, i, x, y;\r
static BOOL filterHasFocus[MAX_CHAT];\r
WORD wMask;\r
HWND hMemo;\r
sprintf(buf, "Chat Window %s", first.tidy);\r
SetWindowText(hDlg, buf);\r
}\r
- for(i=0; i<MAX_CHAT; i++) if(chatHandle[i]) {
+ for(i=0; i<MAX_CHAT; i++) if(chatHandle[i]) {\r
if(i == partner) continue;\r
// set our button in other open chats\r
SetDlgItemText(chatHandle[i], IDC_Focus1+partner-(i<partner), chatPartner[partner]);\r
SetDlgItemText(hDlg, IDC_Focus1+i-(i>partner), chatPartner[i]);\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
+ x = wpConsole.x; y = wpConsole.y; EnsureOnScreen(&x, &y, 0, 0);\r
+ SetWindowPos(hDlg, NULL, x, y, 0, 0, SWP_NOZORDER|SWP_NOSIZE);\r
SendMessage( GetDlgItem(hDlg, IDC_ChatPartner), // [HGM] clickbox: initialize with requested handle\r
WM_SETTEXT, 0, (LPARAM) chatPartner[partner] );\r
filterHasFocus[partner] = TRUE;\r