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

返回自定义实本的夹点

IDL
[id(8)]
void CustomEntity_getGripPoints(IDispatch* pCustomEntity, LONG* pOk);
参数 
说明 
IDispatch* pCustomEntity 
IMxDrawCustomEntity对象 
LONG* pOk 
返回值,成功回 1. 

例如: VC COM

                void CTestVc2005Dlg::CustomEntity_getGripPointsMxdrawxctrl1(LPDISPATCH pCustomEntity, long* pOk)
                {
                    // TODO: 在此处添加消息处理程序代码
                    *pOk = 1;
                    IMxDrawCustomEntityPtr spDrawData;
                    pCustomEntity->QueryInterface(&spDrawData);

                    CString sGuid = spDrawData->Guid;
                    if(sGuid == MX_CUSTOM_ENTITY_ID)
                    {
                        if(spDrawData->IsHave(_T("ept") )  != VARIANT_TRUE)
                            return;

                        IMxDrawPointPtr stp =  spDrawData->GetPoint(_T("spt"));
                        if(stp == NULL)
                            return;

                        IMxDrawPointPtr ept =  spDrawData->GetPoint(_T("ept"));
                        if(ept == NULL)
                            return;

                        MxDrawXLib::IMxDrawResbufPtr ret;
                        ret.CreateInstance(__uuidof( MxDrawXLib::MxDrawResbuf ));
                        ret->AddPoint(stp);
                        ret->AddPoint(ept);

                        IDispatchPtr pRet;
                        ret->QueryInterface(&pRet);

                        m_ocx.SetEventRetEx(pRet);
                    }
                }
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!