X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/9a70ac47c9565629090cfed8c5d139771d75f69d..9ad90448c75dfbf85f25b7587f2352157d1a190a:/windlg.c diff --git a/windlg.c b/windlg.c index ca869141..6967f4be 100644 --- a/windlg.c +++ b/windlg.c @@ -1,7 +1,13 @@ #include #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include #include @@ -1573,9 +1579,13 @@ void logevent (char *string) { events[nevents] = smalloc(1+strlen(string)); strcpy (events[nevents], string); nevents++; - if (logbox) + if (logbox) { + int count; SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING, 0, (LPARAM)string); + count = SendDlgItemMessage (logbox, IDN_LIST, LB_GETCOUNT, 0, 0); + SendDlgItemMessage (logbox, IDN_LIST, LB_SETCURSEL, count-1, 0); + } } void showeventlog (HWND hwnd) {