adding support for different windows compiler
[xboard.git] / winboard / winboard.c
index 55802b4..a00473e 100644 (file)
@@ -57,6 +57,7 @@
 #include <windows.h>\r
 #include <winuser.h>\r
 #include <winsock.h>\r
+#include <commctrl.h>\r
 \r
 #include <stdio.h>\r
 #include <stdlib.h>\r
@@ -1671,6 +1672,8 @@ ParseArgs(GetFunc get, void *cl)
     case ArgNone:\r
       ExitArgError("Unrecognized argument", argValue);\r
       break;\r
+    case ArgTrue:\r
+    case ArgFalse: ;\r
     }\r
   }\r
 }\r
@@ -1844,6 +1847,7 @@ InitAppData(LPSTR lpCmdLine)
   appData.reuseSecond = TRUE;\r
   appData.blindfold = FALSE;\r
   appData.icsEngineAnalyze = FALSE;\r
+  memset(&dcb, 0, sizeof(DCB)); // required by VS 2002 +\r
   dcb.DCBlength = sizeof(DCB);\r
   dcb.BaudRate = 9600;\r
   dcb.fBinary = TRUE;\r
@@ -8864,7 +8868,7 @@ DisplayMessage(char *str1, char *str2)
   }\r
   messageText[MESSAGE_TEXT_MAX - 1] = NULLCHAR;\r
 \r
-  if (IsIconic(hwndMain)) return;\r
+  if (hwndMain == NULL || IsIconic(hwndMain)) return;\r
   hdc = GetDC(hwndMain);\r
   oldFont = SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf);\r
   ExtTextOut(hdc, messageRect.left, messageRect.top, ETO_CLIPPED|ETO_OPAQUE,\r
@@ -10697,3 +10701,4 @@ void SetProgramStats( FrontEndProgramStats * stats )
 \r
     EngineOutputUpdate( stats );\r
 }\r
+///
\ No newline at end of file