#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
+#ifndef AUTO_WINSOCK
+#ifdef WINSOCK_TWO
+#include <winsock2.h>
+#else
#include <winsock.h>
+#endif
+#endif
#include <stdio.h>
#include <stdlib.h>
DialogBox (hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
NULL, LicenceProc);
EnableWindow(hwnd, 1);
+ SetActiveWindow(hwnd);
return 0;
}
return 0;
DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
GetParent(hwnd), AboutProc);
EnableWindow(hwnd, 1);
+ SetActiveWindow(hwnd);
}
return GenericMainDlgProc (hwnd, msg, wParam, lParam,
MAIN_NPANELS, mainp, &page);
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) {