diff win/dw.c @ 45:90aa71b3298a

Fixed makefile for Windows, and updated to latest source.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 30 Oct 2001 10:15:44 +0000
parents 88c9c7410c22
children 30d091bc7899
line wrap: on
line diff
--- a/win/dw.c	Wed Oct 24 03:47:34 2001 +0000
+++ b/win/dw.c	Tue Oct 30 10:15:44 2001 +0000
@@ -221,6 +221,21 @@
 }
 #endif
 
+/* This should return true for WinNT/2K/XP and false on Win9x */
+int IsWinNT(void)
+{
+	static int isnt = -1;
+
+	if(isnt == -1)
+	{
+		if (GetVersion() < 0x80000000)
+			isnt = 1;
+		else
+			isnt = 0;
+	}
+	return isnt;
+}
+
 /* This function adds a signal handler callback into the linked list.
  */
 void _new_signal(ULONG message, HWND window, void *signalfunction, void *data)
@@ -1581,7 +1596,12 @@
 			 * occured and to update it's internal value.
 			 */
 			if(cinfo->buddy && !cinfo->combo)
-				SendMessage(cinfo->buddy, WM_USER+10, 0, 0);
+			{
+				if(IsWinNT())
+					PostMessage(cinfo->buddy, WM_USER+10, 0, 0);
+				else
+					SendMessage(cinfo->buddy, WM_USER+10, 0, 0);
+			}
 			break;
 		case WM_USER+10:
 			{