www.mxdraw.com
|
设置实体的显示顺序
[id(130), helpstring("method SetEntityDrawOrder")] VARIANT_BOOL SetEntityDrawOrder(LONGLONG lId, LONG lOrder);
参数 |
说明 |
LONGLONG lId |
实体的id. |
LONG lOrder |
新的显示顺序 |
成功返回TRUE.
例如: VC代码
void Vc2005Dlg::DoDrawOrder() { // 选择实体。 MxDrawXLib::IMxDrawUtilityPtr mxUtility; mxUtility.CreateInstance(__uuidof( MxDrawXLib::MxDrawUtility )); if(mxUtility == NULL) { return; } // _bstr_t sPrompt(_T("请选择实体")); CComPtr<IMxDrawPoint> spPickPoint; IMxDrawEntityPtr spEntity = mxUtility->GetEntity(&spPickPoint,_T("请选择实体")); if(spEntity == NULL) return; // 把实体设置成,最下面去。 m_ocx.SetEntityDrawOrder(spEntity->GetObjectID(),-100); long lOrder = m_ocx.GetEntityDrawOrder(spEntity->GetObjectID()); }