怎样动态创建二级子菜单
怎样动态创建CCC0的二级子菜单,有菜单项CCC00,CCC01,CCC02
HMENU theMenu=GetMenu(hwnd);
if(theMenu)
{
int ItemCount=GetMenuItemCount(theMenu);
HMENU pop = CreatePopupMenu();
InsertMenu(pop,0,MF_BYPOSITION,IDM_ITEM0,"CCC0");
InsertMenu(pop,1,MF_BYPOSITION,IDM_ITEM1,"CCC1");
InsertMenu(theMenu, ItemCount-1, MF_BYPOSITION | MF_STRING|MF_POPUP, (UINT)pop, "CCC");
DrawMenuBar(hwnd);
}