RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDockTree.HitTest Method

Indicates which docked control is at a specified mouse position.

Pascal
function HitTest(const MousePos: TPoint; out HTFlag: Integer): TControl; virtual;
C++
virtual __fastcall TControl * HitTest(const TPoint MousePos, int HTFlag);

Applications can't call this protected method. TDockTree uses HitTest internally to determine how to respond to mouse clicks. 

MousePos indicates the position of the mouse pointer. 

HTFlag indicates where the mouse pointer is relative to the docked control that is the return value. It is one of the following values:

Value 
Meaning 
HTNOWHERE  
The mouse pointer is not anywhere in the docking region.  
HTCLIENT  
The mouse pointer is over the client area of the docked control.  
HTBORDER  
The mouse pointer is over the splitter that allows docking zones to be resized.  
HTCAPTION  
The mouse pointer is over the grab region where users can start to drag a docked control out of its docked position.  
HTCLOSE  
The mouse pointer is over the portion of the grab region that contains the "close" button for closing the docked control window.  

HitTest returns the docked client that is under the mouse. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!