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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MFC and Menus

MFC and Menus

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
6 Posts 3 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.
  • E Offline
    E Offline
    Eversman
    wrote on last edited by
    #1

    Hey, I am trying to get my menu that I created to show up on a dialog box. I can do it on the document based ones, but that was a long time ago, and can't remember how to do it. Does anyone have any tutorials on how to create a basic menu? I have found some tuts with many advanced features and don't need all that stuff. Thanks

    V 1 Reply Last reply
    0
    • E Eversman

      Hey, I am trying to get my menu that I created to show up on a dialog box. I can do it on the document based ones, but that was a long time ago, and can't remember how to do it. Does anyone have any tutorials on how to create a basic menu? I have found some tuts with many advanced features and don't need all that stuff. Thanks

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      Create the menu in Resource Editor. Add it to the dialog window via SetMenu(). Kuphryn

      E 1 Reply Last reply
      0
      • V valikac

        Create the menu in Resource Editor. Add it to the dialog window via SetMenu(). Kuphryn

        E Offline
        E Offline
        Eversman
        wrote on last edited by
        #3

        Could you perhaps eleborate on the SetMenu() function a bit?

        V 1 Reply Last reply
        0
        • E Eversman

          Could you perhaps eleborate on the SetMenu() function a bit?

          V Offline
          V Offline
          valikac
          wrote on last edited by
          #4

          SetMenu() takes a pointer to a CMenu object. That is it. Declare a CMenu object as the dialog window's member. Kuphryn

          E 1 Reply Last reply
          0
          • V valikac

            SetMenu() takes a pointer to a CMenu object. That is it. Declare a CMenu object as the dialog window's member. Kuphryn

            E Offline
            E Offline
            Eversman
            wrote on last edited by
            #5

            ok, so i create a menu, go to the class wizard and it asks me to make a new class, so lets say i name it DEPMenu, I then go to the init function of the dialog and type SetMenu(?); the ? means what exactly goes inside of it?

            D 1 Reply Last reply
            0
            • E Eversman

              ok, so i create a menu, go to the class wizard and it asks me to make a new class, so lets say i name it DEPMenu, I then go to the init function of the dialog and type SetMenu(?); the ? means what exactly goes inside of it?

              D Offline
              D Offline
              Dreamz
              wrote on last edited by
              #6

              Am i missing something? If you have the ID of the menu like IDR_MENU1 set it at the Dialog Properties->Menu :)

              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