Anyone have any tricks to set the AHK menu's window style?
My goal is to remove MNS_CHECKORBMP to display both an icon and a checkbox.
This does not work:
MI_SetMenuStyle(MenuNameOrHandle, 0x0)
but this does to remove the space for icon/check altogether
MI_SetMenuStyle(MenuNameOrHandle, 0x80000000)
Code: Select all
; Valid (and safe to use) styles:
; MNS_AUTODISMISS 0x10000000
; MNS_CHECKORBMP 0x04000000 The same space is reserved for the check mark and the bitmap.
; MNS_NOCHECK 0x80000000 No space is reserved to the left of an item for a check mark.
MI_SetMenuStyle(MenuNameOrHandle, style="0x4000000")
{
if MenuNameOrHandle is integer
h_menu := MenuNameOrHandle
else
h_menu := MI_GetMenuHandle(MenuNameOrHandle)
if !h_menu
return
VarSetCapacity(mi,28,0), NumPut(28,mi)
NumPut(0x10,mi,4) ; fMask=MIM_STYLE
NumPut(style,mi,8)
DllCall("SetMenuInfo","uint",h_menu,"uint",&mi)
}