Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 5 - Control Manager / Control Manager Reference
Control Manager Routines / Handling Mouse Events in Controls


TestControl

The TestControl function is called by the FindControl and TrackControl functions--normally you won't need to call it yourself. However, should you ever need to determine the control part in which a mouse-down event occurred, you can use the TestControl function.

FUNCTION TestControl (theControl: ControlHandle; thePt: Point)
                      : Integer;
theControl
A handle to the control in which the mouse-down event occurred.
thePt
The point, in a window's local coordinates, where the mouse-down
event occurred.
DESCRIPTION
When the control specified by the parameter theControl is visible and active, TestControl tests which part of the control contains the point specified by the parameter thePt. For its function result, TestControl returns the part code of the control part, or 0 if the point is outside the control.

If the control is invisible or inactive, TestControl returns 0.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996