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. How do I get a menu bar by using a resource ID?

How do I get a menu bar by using a resource ID?

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsharpvisual-studiolearning
4 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.
  • K Offline
    K Offline
    KellyR
    wrote on last edited by
    #1

    Hi, this app is in C++ using Visual Studio 6.0, without MFC. Basically I need to get the main menu of my application as an HMENU; this is the menu that has "File," "About," etc. The menu has a resource ID: IDC_MAINMENU. GetDlgItem doesn't seem to work. GetSystemMenu is the wrong menu. Is there a way I can get the primary menu of my application by using a resource ID? If not, is there another way to do it? Thanks!

    KR

    L H 2 Replies Last reply
    0
    • K KellyR

      Hi, this app is in C++ using Visual Studio 6.0, without MFC. Basically I need to get the main menu of my application as an HMENU; this is the menu that has "File," "About," etc. The menu has a resource ID: IDC_MAINMENU. GetDlgItem doesn't seem to work. GetSystemMenu is the wrong menu. Is there a way I can get the primary menu of my application by using a resource ID? If not, is there another way to do it? Thanks!

      KR

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      KellyR wrote:

      Hi, this app is in C++ using Visual Studio 6.0, without MFC. Basically I need to get the main menu of my application as an HMENU;

      GetMenu()[^]

      led mike

      K 1 Reply Last reply
      0
      • L led mike

        KellyR wrote:

        Hi, this app is in C++ using Visual Studio 6.0, without MFC. Basically I need to get the main menu of my application as an HMENU;

        GetMenu()[^]

        led mike

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

        Yay, that was easy. Thanks!

        KR

        1 Reply Last reply
        0
        • K KellyR

          Hi, this app is in C++ using Visual Studio 6.0, without MFC. Basically I need to get the main menu of my application as an HMENU; this is the menu that has "File," "About," etc. The menu has a resource ID: IDC_MAINMENU. GetDlgItem doesn't seem to work. GetSystemMenu is the wrong menu. Is there a way I can get the primary menu of my application by using a resource ID? If not, is there another way to do it? Thanks!

          KR

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

          Like this: m_menu=GetMenu(); m_menu=m_Menu->GetSubmenu(0);

          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