|
nomainwin menu #w, "Help", "Help Topics F1", [help] open "Menu shortcut" for window as #w #w "trapclose [quit]" timer 10, [testkey] wait [quit] close #w end [testkey] calldll #user32, "GetAsyncKeyState", _VK_F1 as long, pressed as short if pressed < 0 then goto [help] wait [help] notice "Help Topics selected" wait
|
menu$ = "Help Topics"+chr$(9)+"F1" menu #w, "Help", menu$, [help] open "Non-working test" for window as #w wait
nomainwin menu #w, "Help", "Help Topics F1", [help] open "Menu shortcut" for window as #w hw = hwnd(#w) calldll #user32, "GetMenu", hw as ulong, hMenuBar as ulong calldll #user32, "GetSubMenu", hMenuBar as ulong, 0 as long, hHelpMenu as ulong struct mii, cbSize as ulong, fMask as ulong, fType as ulong, fState as ulong, _ wID as ulong, hSubMenu as ulong, hbmpChecked as ulong, hbmpUnchecked as ulong, _ dwItemData as ulong, dwTypeData as ptr, cch as ulong mii.cbSize.struct = len(mii.struct) mii.fMask.struct = _MIIM_TYPE mii.fType.struct = _MFT_STRING mii.dwTypeData.struct = "Help Topics" + chr$(9) + "F1" calldll #user32, "SetMenuItemInfoA", hHelpMenu as ulong, 0 as long, 1 as long, _ mii as struct, ret as long #w "trapclose [quit]" timer 10, [testkey] wait [quit] close #w end [testkey] calldll #user32, "GetAsyncKeyState", _VK_F1 as long, pressed as short if pressed < 0 then goto [help] wait [help] notice "Help Topics selected" wait