自己解决了: 继承CAdUiDockControlBar类,重载AddCustomMenuItems函数如下: BOOL CMyDockBar::AddCustomMenuItems(LPARAM hMenu) { HMENU hPopMenu; hPopMenu = (HMENU)(hMenu & 0xffff); CMenu* pop_menu = CMenu::FromHandle(hPopMenu); // 去掉弹出菜单上默认的 pop_menu->RemoveMenu(ID_ADUI_HIDEBAR, MF_BYCOMMAND); pop_menu->RemoveMenu(ID_ADUI_ALLOWDOCK, MF_BYCOMMAND); return true; } 就行了 |