Creating and Adding Menu at runtime
-
Hi Guys, I would like to ask u brilliant people that i have a problem in creating and adding a menu at runtime. Till now i have created a menu and also loaded in the output but the problem that i am facing is that i am unable to add menu items to it and the functionality of those. I am using MFC's CMenu class for doing this Pls Help me!! Regards, Pankaj Sachdeva
-
Hi Guys, I would like to ask u brilliant people that i have a problem in creating and adding a menu at runtime. Till now i have created a menu and also loaded in the output but the problem that i am facing is that i am unable to add menu items to it and the functionality of those. I am using MFC's CMenu class for doing this Pls Help me!! Regards, Pankaj Sachdeva
How did you try to insert menu? did you use of
CMenu::InsertMenu
orCMenu::AppendMenu
WhiteSky
-
How did you try to insert menu? did you use of
CMenu::InsertMenu
orCMenu::AppendMenu
WhiteSky
Till now i did this sir CMenu *pMenu = GetMenu(); pMenu->AppendMenu(MF_POPUP,0,"Heading"); but the problem is that i m unable to add menu items or submenu to it and also not able to attch coress functions to it
-
Till now i did this sir CMenu *pMenu = GetMenu(); pMenu->AppendMenu(MF_POPUP,0,"Heading"); but the problem is that i m unable to add menu items or submenu to it and also not able to attch coress functions to it
-
used insertmenu function too but it works same as appendmenu
-
thank you got it
-
used insertmenu function too but it works same as appendmenu
If you run exmaple of MSDN and use of this code
submenu->AppendMenu(MF_POPUP, (UINT) submenu->m_hMenu, "&File");
it creates a popup menu for you did you try it?
WhiteSky