I want to know if the IPoint of the mouse position is hitting an IPolyline, I wrote this code, and was optimistic that it would work, but it always returns false.
IPolyline poly1 = pc1 as IPolyline;
IHitTest test = poly1 as IHitTest;
if (test != null)
{
int a = 0;
int b = 0;
bool c = false;
double distance = 0;
IPoint hitPoint = new PointClass();
bool isHit = test.HitTest(mousepoint,
50000,
esriGeometryHitPartType.esriGeometryPartNone,
hitPoint,
ref distance,
ref a, ref b, ref c);
}
