How can I remove the space for checkmarks in front of menu items?
I tried to adapt an snippet from Fluid Byte but with no success:
Code: Select all
#MNS_NOCHECK = $80000000
#MIM_STYLE = $00000010
Structure MENUINFO
cbSize.l
fMask.l
dwStyle.l
cyMax.l
hbrBack.l
dwContextHelpID.l
dwMenuData.l
EndStructure
hWindow=OpenWindow(1,0,0,640,480,"",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
hMenu=CreateMenu(1, WindowID(1))
MenuTitle("Datei")
MenuItem(1, "Open")
MenuItem(2, "Save")
MenuItem(3, "Save as")
hSubMenu = OpenSubMenu("Recent files")
MenuItem(5, "File 1")
MenuItem(6, "File 2")
CloseSubMenu()
MenuItem(4, "Quit")
mi.MENUINFO
mi\cbSize = SizeOf(MENUINFO)
mi\fMask = #MIM_STYLE
mi\dwStyle = #MNS_NOCHECK
; SetMenuInfo_(MenuID(1),mi)
; SetMenuInfo_(hMenu,mi); Doesn't work with whole menu
SetMenuInfo_(MenuID(1),mi)
SetMenuInfo_(hSubMenu,mi); workes only with submenu
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
that it would work because the help manual states that CreateMenu() returns
nothing back.
Any ideas how it can be done for a menu (sub menu can have checkmarks)?