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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    M L N 3 Replies Last reply
    0
    • Z zxc89

      [Message Deleted]

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      If the menu items do not have handlers ( ON_COMMAND ) they will be disabled by default. If you want to have them enabled, either had handlers for the command or and update handlers ( ON_UPDATE_COMMAND_UI ) to enablet the menu item.


      Maximilien Lincourt Your Head A Splode - Strong Bad

      1 Reply Last reply
      0
      • Z zxc89

        [Message Deleted]

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

        Hello, try this to solve it: // to activate an menuitem: m_cMenu.EnableMenuItem(IDC_FILE_SAVE, MF_ENABLED); m_cMenu.EnableMenuItem(IDC_FILE_SAVE_AS, MF_ENABLED); // to deactivate an menuitem: m_cMenu.EnableMenuItem(IDC_FILE_SAVE, MF_DISABLED | MF_GRAYED); m_cMenu.EnableMenuItem(IDC_FILE_SAVE_AS, MF_DISABLED | MF_GRAYED); // NOTE: "m_cMenu" is not a submenu, is no matter is this a submenu or not // m_cMenu.[EnableMenuItem] takes all subitems such as popupmenu when you dropdown the menuitem // example: MenuItem "File"->"Save" and "File"->"SaveAs" is in my sample i hope this can help you! regards break;

        1 Reply Last reply
        0
        • Z zxc89

          [Message Deleted]

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          Inside your MDI MainFrame Constructor set this boolean variable to FALSE

          m_bAutoMenuEnable = FALSE;


          Nibu thomas Software Developer

          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