Interface *MaxInterface= GetCOREInterface();
IMenuManager *MaxMenuManager = MaxInterface->GetMenuManager();
IMenu *MaxMainMenu = MaxMenuManager->GetMainMenuBar();
IMenu *TestMenu = GetIMenu();
TestMenu->SetTitle("TestMenu");
IMenuItem *TestMenuItem = GetIMenuItem();
TestMenuItem->SetTitle("TestMenuItem");
TestMenu->AddItem(TestMenuItem);
IMenuItem *TempMenuItem = GetIMenuItem();
TempMenuItem->SetSubMenu(TestMenu);
MaxMenuManager->RegisterMenu(TestMenu);
MaxMainMenu->AddItem(TempMenuItem);
MaxMenuManager->UpdateMenuBar();
转载于:https://www.cnblogs.com/sitt/archive/2010/05/19/1739240.html