Important: The information in this document is obsolete and should not be used for new development.
TestControl
TheTestControl
function is called by theFindControl
andTrackControl
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 theTestControl
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 parametertheControl
is visible and active,TestControl
tests which part of the control contains the point specified by the parameterthePt
. 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.