- "manage" controls created by CreateXxxXxxControl() functions.
- FindControlUnderMouse() returns an existing control, not a new one.
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index 3c6ba5e..70bdb3e 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -4035,29 +4035,6 @@
 	return _res;
 }
 
-static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
-{
-	PyObject *_res = NULL;
-	ControlHandle _rv;
-	Point inWhere;
-	WindowPtr inWindow;
-	SInt16 outPart;
-#ifndef FindControlUnderMouse
-	PyMac_PRECHECK(FindControlUnderMouse);
-#endif
-	if (!PyArg_ParseTuple(_args, "O&O&",
-	                      PyMac_GetPoint, &inWhere,
-	                      WinObj_Convert, &inWindow))
-		return NULL;
-	_rv = FindControlUnderMouse(inWhere,
-	                            inWindow,
-	                            &outPart);
-	_res = Py_BuildValue("O&h",
-	                     CtlObj_New, _rv,
-	                     outPart);
-	return _res;
-}
-
 static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
 {
 	PyObject *_res = NULL;
@@ -4137,7 +4114,7 @@
 	                         &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4340,7 +4317,7 @@
 	                                       &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4375,7 +4352,7 @@
 	                                &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4410,7 +4387,7 @@
 	                                 &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4433,7 +4410,7 @@
 	                                  &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4456,7 +4433,7 @@
 	                              &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4485,7 +4462,7 @@
 	                             &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4520,7 +4497,7 @@
 	                                  &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4564,7 +4541,7 @@
 	                                  &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4593,7 +4570,7 @@
 	                               &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4616,7 +4593,7 @@
 	                            &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4645,7 +4622,7 @@
 	                          &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4671,7 +4648,7 @@
 	                             &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4706,7 +4683,7 @@
 	                             &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4735,7 +4712,7 @@
 	                               &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4761,7 +4738,7 @@
 	                                 &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4787,7 +4764,7 @@
 	                               &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4819,7 +4796,7 @@
 	                                &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4851,7 +4828,7 @@
 	                             &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4892,7 +4869,7 @@
 	                                &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4915,7 +4892,7 @@
 	                               &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4953,7 +4930,7 @@
 	                                     &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
 	return _res;
 }
 
@@ -4979,7 +4956,30 @@
 	                                &outControl);
 	if (_err != noErr) return PyMac_Error(_err);
 	_res = Py_BuildValue("O&",
-	                     CtlObj_WhichControl, outControl);
+	                     CtlObj_New, outControl);
+	return _res;
+}
+
+static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
+{
+	PyObject *_res = NULL;
+	ControlHandle _rv;
+	Point inWhere;
+	WindowPtr inWindow;
+	SInt16 outPart;
+#ifndef FindControlUnderMouse
+	PyMac_PRECHECK(FindControlUnderMouse);
+#endif
+	if (!PyArg_ParseTuple(_args, "O&O&",
+	                      PyMac_GetPoint, &inWhere,
+	                      WinObj_Convert, &inWindow))
+		return NULL;
+	_rv = FindControlUnderMouse(inWhere,
+	                            inWindow,
+	                            &outPart);
+	_res = Py_BuildValue("O&h",
+	                     CtlObj_WhichControl, _rv,
+	                     outPart);
 	return _res;
 }
 
@@ -5011,8 +5011,6 @@
 	 "(WindowPtr theWindow, RgnHandle updateRegion) -> None"},
 	{"FindControl", (PyCFunction)Ctl_FindControl, 1,
 	 "(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)"},
-	{"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
-	 "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"},
 	{"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
 	 "(WindowPtr inWindow) -> None"},
 
@@ -5090,6 +5088,8 @@
 	 "(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)"},
 	{"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
 	 "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"},
+	{"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
+	 "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"},
 	{"as_Control", (PyCFunction)Ctl_as_Control, 1,
 	 "(Handle h) -> (ControlHandle _rv)"},
 	{NULL, NULL, 0}
diff --git a/Mac/Modules/ctl/ctledit.py b/Mac/Modules/ctl/ctledit.py
index 992612c..6ba024b 100644
--- a/Mac/Modules/ctl/ctledit.py
+++ b/Mac/Modules/ctl/ctledit.py
@@ -1,3 +1,12 @@
+# FindControlUnderMouse() returns an existing control, not a new one,
+# so create this one by hand.
+f = Function(ExistingControlHandle, 'FindControlUnderMouse',
+    (Point, 'inWhere', InMode),
+    (WindowRef, 'inWindow', InMode),
+    (SInt16, 'outPart', OutMode),
+)
+functions.append(f)
+
 f = Function(ControlHandle, 'as_Control',
 	(Handle, 'h', InMode))
 functions.append(f)
@@ -25,3 +34,12 @@
 f.docstring = lambda : "() -> None"
 
 methods.append(f)
+
+# All CreateXxxXxxControl() functions return a new object in an output
+# parameter; these should however be managed by us (we're creating them
+# after all), so set the type to ControlRef.
+for f in functions:
+	if f.name.startswith("Create"):
+		v = f.argumentList[-1]
+		if v.type == ExistingControlHandle:
+			v.type = ControlRef
diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py
index de7353c..d78cb5f 100644
--- a/Mac/Modules/ctl/ctlscan.py
+++ b/Mac/Modules/ctl/ctlscan.py
@@ -45,6 +45,7 @@
 
 	def makeblacklistnames(self):
 		return [
+			'FindControlUnderMouse', # Generated manually, returns an existing control, not a new one.
 			'DisposeControl', # Generated manually
 			'KillControls', # Implied by close of dialog
 			'SetCtlAction',