www.mxdraw.com
内容索引主面
前一个向上下一个
_DMxDrawX::GetPoint 方法

与用户交互在图面上提取一个点

IDL
[id(28), helpstring("method GetPoint")]
IDispatch* GetPoint(VARIANT_BOOL bValidBasePoint, DOUBLE dX, DOUBLE dY, BSTR pszPrompt);
参数 
说明 
VARIANT_BOOL bValidBasePoint 
参考点,是否有效 
BSTR pszPrompt 
命令行提示 
point 
交互提取时的参考点 

返回提取的点

例如: JS;

function DoCommandEventFunc(iCmd)
{
        if (iCmd == 1) 
        {
        var mxOcx = document.all.item("MxDrawXCtrl");
                mxOcx.focus();
        var point1 = mxOcx.GetPoint(false,0,0,"n 点取开始点:");
        if(point1 == null)
        {
            return;
        }
        var point2 = mxOcx.GetPoint(true,point1.x,point1.y,"n 点取结束点:");
        if(point1 == null)
        {
            return;
        }
                mxOcx.DrawLine(point1.x,point1.y,point2.x,point2.y);
        
    }
}
document.getElementById("MxDrawXCtrl").ImplementCustomEvent = CustomEvent;
document.getElementById("MxDrawXCtrl").ImplementMouseEventFun = MouseEvent;
document.getElementById("MxDrawXCtrl").ImplementCommandEventFun = DoCommandEventFunc;
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!