fixed refcount leak in CreateNewWindow() and CreateWindowFromResource().
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index 250e4ed..30301e0 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -3112,7 +3112,7 @@
 	                       &outWindow);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     WinObj_WhichWindow, outWindow);
+	                     WinObj_New, outWindow);
 	return _res;
 }
 
@@ -3132,7 +3132,7 @@
 	                                &outWindow);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     WinObj_WhichWindow, outWindow);
+	                     WinObj_New, outWindow);
 	return _res;
 }
 
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index c6ba7ec..cfe3eb3 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -136,6 +136,13 @@
 			([("void", "wStorage", "OutMode")],
 			 [("NullStorage", "*", "InMode")]),
 			
+			# match FindWindowOfClass
+			([("WindowRef", "outWindow", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")],
+			 [("ExistingWindowPtr", "*", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")]),
+		    # then match CreateNewWindow and CreateWindowFromResource
+			([("WindowRef", "outWindow", "OutMode")],
+			 [("WindowRef", "*", "*")]),
+			
 			([("WindowPtr", "*", "OutMode")],
 			 [("ExistingWindowPtr", "*", "*")]),
 			([("WindowRef", "*", "OutMode")],	# Same, but other style headerfiles