int CBCGPEditCtrl::HitTest | ( | CPoint & | pt, |
BOOL | bNormalize = FALSE , |
||
BOOL | bIgnoreTextBounds = FALSE |
||
) |
Given a point in the client coordinates returns the offset of a symbol containing this point from the beginning of the text.
Call this member function if you want to determine the offset of a symbol containing the specified point in the client coordinates. If the point is outside of text the this function returns the offset of the nearest symbol.
If the function return the value different than -1 and bNormalize is TRUE, pt will contain coordinates of top-left corner of the symbol whose offset is returned.
pt | Specifies the point to test. |
bNormalize | If TRUE, when the function returns pt will contain coordinates of the symbol whose offset is returned by the function. |
bIgnoreTextBounds | If FALSE, the function will fail (return -1) if the specified point is outside of the text bounding rectangle. |