Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Creating and Adding Menu at runtime

Creating and Adding Menu at runtime

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karismatic
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • K Karismatic

      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

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      How did you try to insert menu? did you use of CMenu::InsertMenu or CMenu::AppendMenu


      WhiteSky


      K 1 Reply Last reply
      0
      • H Hamid Taebi

        How did you try to insert menu? did you use of CMenu::InsertMenu or CMenu::AppendMenu


        WhiteSky


        K Offline
        K Offline
        Karismatic
        wrote on last edited by
        #3

        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

        H 1 Reply Last reply
        0
        • K Karismatic

          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

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See CMenu:: InsertMenu[^] does helpful?


          WhiteSky


          K 2 Replies Last reply
          0
          • H Hamid Taebi

            See CMenu:: InsertMenu[^] does helpful?


            WhiteSky


            K Offline
            K Offline
            Karismatic
            wrote on last edited by
            #5

            used insertmenu function too but it works same as appendmenu

            H 1 Reply Last reply
            0
            • H Hamid Taebi

              See CMenu:: InsertMenu[^] does helpful?


              WhiteSky


              K Offline
              K Offline
              Karismatic
              wrote on last edited by
              #6

              thank you got it

              1 Reply Last reply
              0
              • K Karismatic

                used insertmenu function too but it works same as appendmenu

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #7

                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


                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups