zoukankan      html  css  js  c++  java
  • acedGetAcadTextCmdLine(),枚举CAD命令行的子窗口 ObjectARX学习笔记(十二)----AcDbGroup 添加新成员,以及往组里面添加实体

    CWnd *wTextCmdLine = acedGetAcadTextCmdLine(); 

    if (wTextCmdLine != NULL)

     {

     ::EnumChildWindows(wTextCmdLine->m_hWnd,EnumChildProc,0); 

    }

     BOOL CALLBACK EnumChildProc(HWND hWnd,LPARAM lParam)

    {

    WCHAR lpWinTitle[256];

     ::GetWindowText(hWnd,lpWinTitle,256-1); 

    CString m_strTitle;

    m_strTitle.Format(_T("%s"),lpWinTitle);

    MessageBox(NULL,m_strTitle,_T("cwnd"),MB_OK);

    WCHAR lpWinTitle2[256];

     ::GetClassName(hWnd,lpWinTitle2,MAX_PATH-1);

    MessageBox(NULL,lpWinTitle2,_T("cwnd"),MB_OK);

    /*命令行会有三个子窗口*/return true;

    }

    AcDbGroup *pGroup = new AcDbGroup;
    AcDbObjectId  groupObjectId;
    AcDbDictionary  *pGroupDict = NULL;
    acdbCurDwg()->getGroupDictionary(pGroupDict, AcDb::kForWrite);
    pGroupDict->setAt("GroupName", pGroup, groupObjectId);//在AcdbGroup词典里面添加一项名为GroupName
    
    
    pGroupDict->close();
    
    
    //如果想实体添加到组里面 将打开的实体ID传入 组里面就行了
    pGroup->append(objectId1);     // objectId1 and objectId2
                                                     // are objId's of the
    pGroup->append(objectId2);     // entities which will be in the group.
    
    pGroup->close();
  • 相关阅读:
    Django REST framework
    容器平台自动化CI/CD流水线实操
    VUE--webpack
    vue动态路由匹配
    VUE学习---vue基础与vue-router
    MYSQL-创建测试数据
    MYSQL-主键、外键
    MYSQL-数据库、表、数据操作
    MySQL-添加环境变量 及MySQL服务启停
    MYSQL-命令行
  • 原文地址:https://www.cnblogs.com/mjgw/p/12392764.html
Copyright © 2011-2022 走看看