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 change menu item propeties ?

How to change menu item propeties ?

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

    Hi, How can I change the menu item properties dynamically? basically, I want to have the menu caption "Running!" when a certain code in my application is running and "Stopped" when the code is in standby. Thank you for your help Zakaria :confused:

    A 1 Reply Last reply
    0
    • Z zakarias

      Hi, How can I change the menu item properties dynamically? basically, I want to have the menu caption "Running!" when a certain code in my application is running and "Stopped" when the code is in standby. Thank you for your help Zakaria :confused:

      A Offline
      A Offline
      Antony M Kancidrowski
      wrote on last edited by
      #2

      Add a handler for the update of the menu item eg:

      void CDocClass::OnUpdateMenuItemName(CCmdUI* pCmdUI)
      {
        if (m_bRunning)
          pCmdUI->SetText(_T("Running"));
        else
          pCmdUI->SetText(_T("Stopped"));
      }

      Ant. I'm hard, yet soft.
      I'm coloured, yet clear.
      I'm fruity and sweet.
      I'm jelly, what am I? Muse on it further, I shall return!
      - David Williams (Little Britain)

      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