『公告』 预祝您龙年大吉,万事如意, 过节期间, 大家如需数据服务,请拨打400 或直接添加客服微信,再祝大家龙年,心想事成。
关注我们 新浪 腾讯

ArcGIS二次开发-如何创建定制的ToolControl

ArcGIS二次开发-如何创建定制的ToolControl
本例要实现的是如何创建定制的 ToolControl。ToolControl 是指具有ComboBox 的下拉列表 或 EditBox 的编辑功能的一类控件。要创建定制的ToolControl , 必 须 在 类 模 块 中 实 现 ICommand 和 IToolControl 接 口 。IToolControl 接口包括 hWnd 属性和 OnDrop, OnFocus 事件。 
       ·IToolControl 接口的 hWnd 属性,接受一个 Window Handle。 
       ·IToolControl 接口的 OnDrop 事件,支持 ToolControl 的拖放,传入参数barType 表示 Bar 类型。 

       ·IToolControl 接口的 OnFocus 事件,传入 IcompletionNotify 类型的参数complete,可以通过执行 IcompletionNotify 接口的 SetComplete 方法告之ArcMAP,ToolControl 可以失去 Focus。 

       本例中涉及三个模块,详细描述如下,其中,在类模块中实现了 IToolBarDef接口来创建自己的 ToolControl。




      京ICP备2025132830号-1 京公网安备 号