extern HWND ChatDialog;\r
\r
extern HINSTANCE hInst;\r
-extern HWND hwndMain;\r
+extern HWND hwndConsole;\r
\r
extern WindowPlacement wpChat[MAX_CHAT];\r
extern WindowPlacement wpConsole;\r
\r
switch (LOWORD(wParam)) {\r
\r
- case IDCANCEL:\r
- chatHandle[partner] = 0;\r
- chatPartner[partner][0] = 0;\r
- ChatPopDown();\r
- EndDialog(hDlg, TRUE);\r
- break;\r
+ case IDCANCEL: /* let Esc key switch focus back to console */\r
+ SetFocus(GetDlgItem(hwndConsole, OPT_ConsoleInput));\r
+ break;\r
\r
case IDC_Clear:\r
SendMessage( GetDlgItem(hDlg, IDC_ChatMemo), WM_SETTEXT, 0, (LPARAM) "" );\r
lpProc = MakeProcInstance( (FARPROC) ChatProc, hInst );\r
\r
/* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */\r
- CreateDialog( hInst, MAKEINTRESOURCE(DLG_Chat), hwndMain, (DLGPROC)lpProc );\r
+ CreateDialog( hInst, MAKEINTRESOURCE(DLG_Chat), hwndConsole, (DLGPROC)lpProc );\r
\r
FreeProcInstance(lpProc);\r
\r