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