QQ聊天

MaxSDK添加菜单项

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();

posted @ 2010-05-19 15:12  SITT  阅读(832)  评论(0编辑  收藏  举报
QQ聊天