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 keep menu attributes that exist when the menu refreshes?

How do I keep menu attributes that exist when the menu refreshes?

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • J Offline
    J Offline
    jonesap5
    wrote on last edited by
    #1

    I am trying to disable some menu items in a menu. I am successful in getting the menu items disabled using the function SetMenuItemInfo; but when the menu refreshes the items are re-enabled and I don't want that. Is there anything that I can do to disable menu items from refresh or recreate of the menu? thanks,

    D M 2 Replies Last reply
    0
    • J jonesap5

      I am trying to disable some menu items in a menu. I am successful in getting the menu items disabled using the function SetMenuItemInfo; but when the menu refreshes the items are re-enabled and I don't want that. Is there anything that I can do to disable menu items from refresh or recreate of the menu? thanks,

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      jonesap5 wrote:

      ...but when the menu refreshes the items are re-enabled...

      During the refresh, are you calling SetMenuItemInfo() or EnableMenuItem()?


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      J 1 Reply Last reply
      0
      • D David Crow

        jonesap5 wrote:

        ...but when the menu refreshes the items are re-enabled...

        During the refresh, are you calling SetMenuItemInfo() or EnableMenuItem()?


        "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

        "There is no death, only a change of worlds." - Native American Proverb

        J Offline
        J Offline
        jonesap5
        wrote on last edited by
        #3

        What happens is I select submenu item from the 'Tool' Menu and it refreshes or recreates the main menu. At that point the sub menu items I disabled in the 'File' Menu are re-enabled. Does that make sense?

        1 Reply Last reply
        0
        • J jonesap5

          I am trying to disable some menu items in a menu. I am successful in getting the menu items disabled using the function SetMenuItemInfo; but when the menu refreshes the items are re-enabled and I don't want that. Is there anything that I can do to disable menu items from refresh or recreate of the menu? thanks,

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          If you're using MFC, read this FAQ: 7.1 In my MFC program, I'm trying to disable a menu item with EnableMenuItem(), but it doesn't have any effect on the menu. Why?[^]

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          J 1 Reply Last reply
          0
          • M Michael Dunn

            If you're using MFC, read this FAQ: 7.1 In my MFC program, I'm trying to disable a menu item with EnableMenuItem(), but it doesn't have any effect on the menu. Why?[^]

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            J Offline
            J Offline
            jonesap5
            wrote on last edited by
            #5

            I am not using MFC, I am actually using a Win32 project.

            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