zoukankan      html  css  js  c++  java
  • axTOCControl右键

    private void axTOCControl1_OnMouseDown(object sender, ITOCControlEvents_OnMouseDownEvent e)
    {
    if (e.button != 2) return;

    esriTOCControlItem item = esriTOCControlItem.esriTOCControlItemNone;
    IBasicMap map = null; ILayer layer = null;
    object other = null; object index = null;

    //Determine what kind of item is selected
    m_tocControl.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);

    //Ensure the item gets selected
    if (item == esriTOCControlItem.esriTOCControlItemMap)
    m_tocControl.SelectItem(map, null);
    else
    m_tocControl.SelectItem(layer, null);

    //Set the layer into the CustomProperty (this is used by the custom layer commands)
    m_mapControl.CustomProperty = layer;

    //Popup the correct context menu
    if (item == esriTOCControlItem.esriTOCControlItemMap) m_menuMap.PopupMenu(e.x, e.y, m_tocControl.hWnd);
    if (item == esriTOCControlItem.esriTOCControlItemLayer) m_menuLayer.PopupMenu(e.x, e.y, m_tocControl.hWnd);

    }

  • 相关阅读:
    web中间件常见漏洞
    心脏滴血与利用
    mimikatz提取windows密码
    Linux文本编辑器
    Linux打包(归档 )压缩命令
    linux文件和目录命令
    SSL原理
    windows server 2008 安装步骤
    渗透测试术语
    centos 7 修改yum配置
  • 原文地址:https://www.cnblogs.com/gisoracle/p/4827854.html
Copyright © 2011-2022 走看看