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 to enble menu item in a system menu?

how to enble menu item in a system menu?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 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.
  • V Offline
    V Offline
    vasu_sri
    wrote on last edited by
    #1

    iam unable to enablemenuitem from dialog system menu.. i worte like this : CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); here it is disabling menu item. after this again, i want to enable the menu item, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); but it is not working. might be some prob in my code. any body can help me ..

    Regards, Srinivas

    _ 1 Reply Last reply
    0
    • V vasu_sri

      iam unable to enablemenuitem from dialog system menu.. i worte like this : CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); here it is disabling menu item. after this again, i want to enable the menu item, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); but it is not working. might be some prob in my code. any body can help me ..

      Regards, Srinivas

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Both MF_DISABLED and MF_ENABLED work perfectly for me. I tried this in a dialog based application.

      «_Superman_»
      I love work. It gives me something to do between weekends.

      Microsoft MVP (Visual C++)

      Polymorphism in C

      V 1 Reply Last reply
      0
      • _ _Superman_

        Both MF_DISABLED and MF_ENABLED work perfectly for me. I tried this in a dialog based application.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        V Offline
        V Offline
        vasu_sri
        wrote on last edited by
        #3

        dialog based application. but i have one window class which is derived from CWnd class. this window have only one close button. that button should be enabled/disabled in different situations. i worte like this for disabling: CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_DISABLED ); same thing for enabled also, CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->EnableMenuItem(SC_CLOSE,MF_ENABLED ); this is not working.

        Regards, Srinivas

        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