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 add checkmark on selecting menu item

how to add checkmark on selecting menu item

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

    hi, i am not able set the check mark when i select the menu item is there any setting when creating the menu templete... the following code snapet CMenu *popMenu=mnu->GetSubMenu(0); CMenu *subpop=popMenu->GetSubMenu(3); UINT state=subpop->GetMenuState(ID_TEMP_SETPRIORITY_ABOVENORMAL,MF_BYCOMMAND); if (state & MF_CHECKED) subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_UNCHECKED|MF_BYCOMMAND); else subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_CHECKED | MF_BYCOMMAND); if any idea please let me ASAP. thanks in advance. FAILURE is the first step towards SUCCESS

    O T 2 Replies Last reply
    0
    • L Laxman9

      hi, i am not able set the check mark when i select the menu item is there any setting when creating the menu templete... the following code snapet CMenu *popMenu=mnu->GetSubMenu(0); CMenu *subpop=popMenu->GetSubMenu(3); UINT state=subpop->GetMenuState(ID_TEMP_SETPRIORITY_ABOVENORMAL,MF_BYCOMMAND); if (state & MF_CHECKED) subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_UNCHECKED|MF_BYCOMMAND); else subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_CHECKED | MF_BYCOMMAND); if any idea please let me ASAP. thanks in advance. FAILURE is the first step towards SUCCESS

      O Offline
      O Offline
      Owner drawn
      wrote on last edited by
      #2

      Try this in the UI handler for the menu item.

      Love Forgives--Love Gives--Jesus is Love :)

      --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

      1 Reply Last reply
      0
      • L Laxman9

        hi, i am not able set the check mark when i select the menu item is there any setting when creating the menu templete... the following code snapet CMenu *popMenu=mnu->GetSubMenu(0); CMenu *subpop=popMenu->GetSubMenu(3); UINT state=subpop->GetMenuState(ID_TEMP_SETPRIORITY_ABOVENORMAL,MF_BYCOMMAND); if (state & MF_CHECKED) subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_UNCHECKED|MF_BYCOMMAND); else subpop->CheckMenuItem(ID_TEMP_SETPRIORITY_ABOVENORMAL, MF_CHECKED | MF_BYCOMMAND); if any idea please let me ASAP. thanks in advance. FAILURE is the first step towards SUCCESS

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        Laxman9 wrote:

        if any idea please let me ASAP.

        http://msdn.microsoft.com/library/en-us/vccore/html/_core_the_on_update_command_ui_macro.asp[^]

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV

        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