基于Engine 的toolbarMenu不可用?

想直接调用esri提供的ControlsEditingVertexContextMenu。代码如下:
IToolbarMenu m_ToolbarMenuEditingVertex = new ToolbarMenu(); //折点编辑右键弹出式菜单
m_ToolbarMenuEditingVertex.CommandPool = axToolbarControl1.CommandPool;
m_ToolbarMenuEditingVertex.SetHook(axMapControl1);
m_ToolbarMenuEditingVertex.AddItem(new ControlsEditingVertexContextMenu(), 0, 0, false, esriCommandStyles.esriCommandStyleIconAndText);
private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
{
if (e.button == 2 )
{
m_ToolbarMenuEditingSketch.PopupMenu(e.x, e.y, axMapControl1.hWnd);
}


问题:但是在折点编辑状态后 弹出的折点编辑菜单的功能项都是灰的
已邀请:

朱新颖

赞同来自:

我在Engine中测试了一下是正常的,见截图。检查一下是否开启了编辑,并且选中了结点,另外还有一句代码 m_EngineEditSketch.SetEditLocation(e.x, e.y); 不知您是否使用了。参考的代码就是AO帮助中的:
http://resources.arcgis.com/en ... 00000
edit.jpg

 
 

要回复问题请先登录注册