Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ShowMenu: check / uncheck menu item
#2
Macro Macro2550
Code:
Copy      Help
str md=
;BEGIN MENU
;&Disable hotspot :551 0 8
;&Exit :550
;END MENU

MenuPopup m.Create(md)

rep
,sel m.Show
,,case 550 break
,,
,,case 551
,,;m.CheckItems( ;;there is no 'uncheck' option
,,_i=GetMenuState(m 551 0)&MFS_CHECKED
,,if _i
,,,CheckMenuItem m 551 0
,,else
,,,CheckMenuItem m 551 MFS_CHECKED

;info: function ShowMenu uses class MenuPopup.

Or use a variable.
Macro Macro2548
Code:
Copy      Help
str md=
;BEGIN MENU
;&Disable hotspot :551 0 0
;&Exit :550
;END MENU

int hotspotDisabled=1
rep
,MenuPopup m.Create(md)
,if(hotspotDisabled) m.CheckItems("551")
,sel m.Show
,,case 550 break
,,
,,case 551
,,hotspotDisabled^1


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)