Index: win32/gdkwindow-win32.c
===================================================================
--- win32/gdkwindow-win32.c	(revision 18344)
+++ win32/gdkwindow-win32.c	(working copy)
@@ -2,6 +2,7 @@
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  * Copyright (C) 1998-2004 Tor Lillqvist
  * Copyright (C) 2001-2004 Hans Breuer
+ * Copyright (C) 2007 Cody Russell
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -83,6 +84,10 @@
 
 #endif
 
+#ifndef GWW_HWNDPARENT
+#  define GWW_HWNDPARENT	-8
+#endif
+
 #if 0
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <stdio.h>
@@ -1986,7 +1991,7 @@
    * USENET. Search on Google.
    */
   SetLastError (0);
-  if (SetWindowLong (window_id, GWL_HWNDPARENT, (long) parent_id) == 0 &&
+  if (SetWindowWord (window_id, GWW_HWNDPARENT, (long) parent_id) == 0 &&
       GetLastError () != 0)
     WIN32_API_FAILED ("SetWindowLong");
 }
@@ -3458,7 +3463,7 @@
 	  owner = gdk_window_new_internal (NULL, &wa, 0, TRUE);
 	}
 
-      SetWindowLong (GDK_WINDOW_HWND (window), GWL_HWNDPARENT,
+      SetWindowWord (GDK_WINDOW_HWND (window), GWW_HWNDPARENT,
 		     (long) GDK_WINDOW_HWND (owner));
 
 #if 0 /* Should we also turn off the minimize and maximize buttons? */
@@ -3472,7 +3477,7 @@
     }
   else
     {
-      SetWindowLong (GDK_WINDOW_HWND (window), GWL_HWNDPARENT, 0);
+      SetWindowWord (GDK_WINDOW_HWND (window), GWW_HWNDPARENT, 0);
     }
 }
 
