|
- 1) Create a command (LoadMyCui) and this is the code:
- static void 采用LoadMyCui(void)
- {
- if (!acedIsMenuGroupLoaded(采用T("MyMenuGroups")))
- acedCommand(RTSTR, 采用T("采用.cuiload"),RTSTR, 采用T("my.cuix"),0);
- }
- 2) In the 'On采用kInitAppMsg' section, add this:
- ads采用queueexpr(采用T("(command "LoadMyCui")"));
- // Menuload
- if (!acedIsMenuGroupLoaded(Menu))
- {
- bool bloadcui = acedLoadPartialMenu(MenuPath.GetBuffer());
- }
- // MenuUnload
- acedUnloadPartialMenu(menu采用str.Mid(1).GetBuffer())
- // menu采用str is CString type
- // Note .cui file (not .cuix)
- TCHAR* strMenuGroupsFile = L"C:\\Documents and Settings\\testCUI.cui";
- VARIANT base;
- VariantInit(&base);
- V采用VT(&base) = VT采用BOOL;
- V采用BOOL(&base) = FALSE;
- AutoCAD::IAcadMenuGroup* pNewMenuGroup = NULL;
- pMenuGroups->Load(strMenuGroupsFile, base, &pNewMenuGroup);
复制代码 |
|