Important: The information in this document is obsolete and should not be used for new development.
TestControl
TheTestControlfunction is called by theFindControlandTrackControlfunctions--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 theTestControlfunction.
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 parametertheControlis visible and active,TestControltests which part of the control contains the point specified by the parameterthePt. For its function result,TestControlreturns the part code of the control part, or 0 if the point is outside the control.If the control is invisible or inactive,
TestControlreturns 0.