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. Disable Menu Item

Disable Menu Item

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

    I added an item on my menu. I also added handlers to it. but when i run my project, the menu i added is disabled. Does anybody know how to solve this problem. it would help a lot.

    H 1 Reply Last reply
    0
    • R romuzu

      I added an item on my menu. I also added handlers to it. but when i run my project, the menu i added is disabled. Does anybody know how to solve this problem. it would help a lot.

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

      I think the item menu need to function for enable you must Add event handler for item menu

      R 1 Reply Last reply
      0
      • H Hamid Taebi

        I think the item menu need to function for enable you must Add event handler for item menu

        R Offline
        R Offline
        romuzu
        wrote on last edited by
        #3

        i actually added an event handler. when the event handler is only ON_COMMAND for that dialog the menu is enabled but when i add the ON_UPDATE_COMMAND_UI event handler, the menu is disabled. and i have another problem, it doesn't show the dialog.

        H 1 Reply Last reply
        0
        • R romuzu

          i actually added an event handler. when the event handler is only ON_COMMAND for that dialog the menu is enabled but when i add the ON_UPDATE_COMMAND_UI event handler, the menu is disabled. and i have another problem, it doesn't show the dialog.

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

          Hi For show Dialog you can ShowWindow(1) or WS_VISIBLE and for diable menu do you use MF_DISABLED?or ModifyMenu Do you use InsertMenu?

          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