I want to be notified if a user pressed enter in a combobox.
Is it possible to do that with a hook into the gadget to capture that event?
I don't want to use a window hook -> modularization...
I don't want to use a global window event loop by AddShortcutKey -> modularization...
O.k. found something at RSBasic:
Code: Select all
Structure KBDLLHOOKSTRUCT
vkCode.l
scanCode.l
flags.l
time.l
dwExtraInfo.l
EndStructure
Procedure.l KeyboardHook(nCode, wParam, *p.KBDLLHOOKSTRUCT)
If wParam = #WM_KEYDOWN Or wParam = #WM_SYSKEYDOWN Or wParam = #WM_KEYUP Or wParam = #WM_SYSKEYUP
If *p\vkCode = 13
debug "KeyboardHook; enter"
ProcedureReturn 1
EndIf
EndIf
ProcedureReturn CallNextHookEx_(0, nCode, wParam, *p)
EndProcedure
SetWindowsHookEx_(#WH_KEYBOARD_LL, @KeyboardHook(), GetModuleHandle_(*Combobox\Sheet\PB), 0)
And it works!!!
What special is this not to enable simply a BindGadgetEvent for some more events for ComboboBoxGadget????
@RSBasic: thanks a lot!