高分请教mo2.3开发问题
为什么老是出现这个错误提示 :ActiveX 控件只接受在 GraphicsUnit.Point 中定义的字体。
参数名: font
出错代码: _manager.AddContentToZone(_cEyeWnd,_wc.ParentZone, 1);
_manager 为 DockingManager 对象 _cEyeWnd 为 Crownwood.Magic.Docking.Content 对象
_wc 为 WindowContent 对象
源代码是这样的:
//创建地图选项卡
CreateMapOutlookBar();
//创建查询选项卡
CreateQueryOutlookBar();
// 设置两个选项卡
_cIndexWnd = _manager.Contents.Add(_mapOutlookBar, "地图", _imagesWorkspace, 2);
_cQueryWnd = _manager.Contents.Add(_queryOutlookBar, "查询", _imagesWorkspace, 1);
_cIndexWnd.CloseButton = false;
_cIndexWnd.HideButton = false;
_cIndexWnd.DisplaySize = new Size(this.Width /5, this.Height *3 / 4);
_cIndexWnd.Control.Width = this.Width /5;
_cQueryWnd.CloseButton = false;
_cQueryWnd.HideButton = false;
this.SuspendLayout();
// 将地图选项卡放置在工作区的左边
_wc = _manager.AddContentWithState(_cIndexWnd, State.DockRight) as WindowContent;
_manager.AddContentToWindowContent(_cQueryWnd, _wc);
_cQueryWnd.ParentWindowContent.ZoneArea = 125;
_mapEye = new AxMapObjects2.AxMap();
_cEyeWnd = _manager.Contents.Add(_mapEye);
_cEyeWnd.FullTitle = "缩略图";
_cEyeWnd.CloseButton = false;
_cEyeWnd.HideButton = false;
_cEyeWnd.DisplaySize = new Size(this.Width / 5, this.Height / 4);
//2003.3.16
this._mapEye.AfterLayerDraw += new AxMapObjects2._DMapEvents_AfterLayerDrawEventHandler(_mapEye_AfterLayerDraw);
this._mapEye.MouseUpEvent += new AxMapObjects2._DMapEvents_MouseUpEventHandler(_mapEye_MouseUpEvent);
_manager.AddContentToZone(_cEyeWnd,_wc.ParentZone, 1);
_cEyeWnd.ParentWindowContent.ZoneArea = 25;
this.ResumeLayout();