Thanks for your answer Sean. I´m developing an application in ArcGIS Engine 9.3.1 and I have to allow the user to draw figures over maps and then modify them. The figures can be any annotation the user want to show in a map (points, polylines, polygons, text and polylines with text along it), for example a forest fire, an accident, etc.
I cannot use the Editor, because it is a desktop object, but thanks to your post I realized I can use IElementVertices and ISelectionTracker. Unfortunately it doesn´t work (I don´t know why because with polylines works perfectly) with Bezier curves as my text with polyline is...
My code is like this:
public override void OnClick()
{
try
{
m_HitElement = ((IGraphicsContainerSelect)AxMapControl1.Map).SelectedElement(0);
if (m_HitElement is IGroupElement)
{
m_EditVertices = (IElementEditVertices) IGroupElement)m_HitElement).get_Element(0);
}
else
{
m_EditVertices = (IElementEditVertices)m_HitElement;
}
m_HitElement.Activate((IDisplay)AxMapControl1.ActiveView.ScreenDisplay);
m_EditVertices.MovingVertices = true;
m_SelectionTracker = m_EditVertices.GetMoveVerticesSelectionTracker();
m_SelectionTracker.Display = AxMapControl1.ActiveView.ScreenDisplay;
m_SelectionTracker.ShowHandles = true;
AxMapControl1.ActiveView.Refresh();
}
catch (Exception Err)
{
}
}
public override void OnMouseUp(int Button, int Shift, int X, int Y)
{
try
{
m_SelectionTracker.OnMouseUp(Button, Shift, X, Y);
m_HitElement.Geometry = m_SelectionTracker.Geometry;
AxMapControl1.ActiveView.GraphicsContainer.UpdateElement(m_HitElement);
AxMapControl1.ActiveView.Refresh();
}
catch (Exception Err)
{
}
}
Thanks again
Víctor Aparicio