X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=81e190d86db807c04f64cb0ec9d4155004772635;hb=dcfab363332520fedcd4e6e8c791a854ba548e83;hp=8d53d7c70c70168ca9cf292c9f5b8cb229a20f56;hpb=187622c7a66834db1b980750e5fe513696308c20;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index 8d53d7c..81e190d 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "common.h" #include "frontend.h" @@ -41,6 +42,7 @@ #include "wsnap.h" int chatCount; +static int onTop; extern char chatPartner[MAX_CHAT][MSG_SIZ]; HANDLE chatHandle[MAX_CHAT]; static WNDPROC chatInputWindowProc; @@ -59,9 +61,10 @@ char *NextInHistory(); extern HWND ChatDialog; extern HINSTANCE hInst; -extern HWND hwndMain; +extern HWND hwndConsole; extern WindowPlacement wpChat[MAX_CHAT]; +extern WindowPlacement wpConsole; extern BoardSize boardSize; @@ -192,10 +195,19 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam sprintf(buf, "Chat Window %s", first.tidy); SetWindowText(hDlg, buf); } -// chatPartner[partner][0] = 0; + for(i=0; ipartner), chatPartner[i]); + } else EnableWindow( GetDlgItem(hDlg, IDC_Focus1+i-(i>partner)), 1 ); + for(i=0; i %s\r\n", mess); // echo only tells to handle, not channel @@ -283,6 +298,22 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam SendToICS(buf); break; + case IDC_Focus1: + case IDC_Focus2: + case IDC_Focus3: + case IDC_Focus4: + i = LOWORD(wParam) - IDC_Focus1; + if(i >= partner) i++; + onTop = i; + SetFocus(GetDlgItem(hDlg, IDC_Send)); + if(chatHandle[i]) { + int j; + for(j=0; j