以下是 CMenu::GetMenuItemCount 的基本用法:
CMenu myMenu;
// 在这里创建或加载菜单

int nItemCount = myMenu.GetMenuItemCount();
// nItemCount 现在包含菜单中的菜单项数量

这个方法返回整数值,表示菜单中的菜单项数量。你可以使用这个值来遍历菜单项或者进行其他相关的操作。


转载请注明出处:http://www.zyzy.cn/article/detail/18949/MFC/CMenu