VC关于动态添加菜单的问题
动态的菜单最后追加一个子菜单:CMenumenu;menu.CreatePopupMenu();GetMenu()->AppendMenu(MF_POPUP,(UINT)...
动态的菜单最后追加一个子菜单:
CMenu menu;
menu.CreatePopupMenu();
GetMenu()->AppendMenu(MF_POPUP,(UINT)menu.m_hMenu,"Append");
并给它添加菜单项:
menu.AppendMenu(MF_STRING,111,"HELLO");
然后在菜单的首位置插入一个子惨淡:
GetMenu()->InsertMenu(MF_POPUP,(UINT)menu.m_hMenu,"Insert");
为什么“Insert”子菜单下也会有“HELLO”菜单项?而且如果给“Insert”子菜单添加菜单项的话,“Append”子菜单也会被添加上同样的菜单项,怎么解决? 展开
CMenu menu;
menu.CreatePopupMenu();
GetMenu()->AppendMenu(MF_POPUP,(UINT)menu.m_hMenu,"Append");
并给它添加菜单项:
menu.AppendMenu(MF_STRING,111,"HELLO");
然后在菜单的首位置插入一个子惨淡:
GetMenu()->InsertMenu(MF_POPUP,(UINT)menu.m_hMenu,"Insert");
为什么“Insert”子菜单下也会有“HELLO”菜单项?而且如果给“Insert”子菜单添加菜单项的话,“Append”子菜单也会被添加上同样的菜单项,怎么解决? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询