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. Menu Control

Menu Control

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
5 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.
  • A Offline
    A Offline
    AbhiHcl
    wrote on last edited by
    #1

    How to get the Top-level menu ID and change it on the run time. I am able laod trhe name of child menu item using Menu ID. But I don't knoe how to load the name of top lavel menu (like File, View, Help) at run time. Please any one can help me. Thanks...

    L 1 Reply Last reply
    0
    • A AbhiHcl

      How to get the Top-level menu ID and change it on the run time. I am able laod trhe name of child menu item using Menu ID. But I don't knoe how to load the name of top lavel menu (like File, View, Help) at run time. Please any one can help me. Thanks...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I think GetMenu()[^] is the function you are looking for.

      Just say 'NO' to evaluated arguments for diadic functions! Ash

      A 1 Reply Last reply
      0
      • L Lost User

        I think GetMenu()[^] is the function you are looking for.

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        A Offline
        A Offline
        AbhiHcl
        wrote on last edited by
        #3

        You are right, but my query is how I will get the parent menu (FILE, View,Help) using get menu. I am able to get the child menu and modifying it using ModifyMenu(); Here is my code:- CMenu *pMenu = GetMenu(); pMenu->ModifyMenuW(ID_FILE_PRINT_REPORT,0,ID_FILE_PRINT_REPORT,"Open File"); Here "Open File" is inside file menu. Now I want to change the name of "File" to "File report", for that I need to know the ID of file which is parent menu.

        L T 2 Replies Last reply
        0
        • A AbhiHcl

          You are right, but my query is how I will get the parent menu (FILE, View,Help) using get menu. I am able to get the child menu and modifying it using ModifyMenu(); Here is my code:- CMenu *pMenu = GetMenu(); pMenu->ModifyMenuW(ID_FILE_PRINT_REPORT,0,ID_FILE_PRINT_REPORT,"Open File"); Here "Open File" is inside file menu. Now I want to change the name of "File" to "File report", for that I need to know the ID of file which is parent menu.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I think you are probably referring to GetSubMenu()[^]. Take a look at the class hierarchy in MSDN to see what other methods each class offers.

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          1 Reply Last reply
          0
          • A AbhiHcl

            You are right, but my query is how I will get the parent menu (FILE, View,Help) using get menu. I am able to get the child menu and modifying it using ModifyMenu(); Here is my code:- CMenu *pMenu = GetMenu(); pMenu->ModifyMenuW(ID_FILE_PRINT_REPORT,0,ID_FILE_PRINT_REPORT,"Open File"); Here "Open File" is inside file menu. Now I want to change the name of "File" to "File report", for that I need to know the ID of file which is parent menu.

            T Offline
            T Offline
            transoft
            wrote on last edited by
            #5

            I think you might need to use "GetMenu()" in the CMainFrame" class.

            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