I am opening a window with a string gadget and OK and Cancel buttons. I use WMHI_VANILLAKEY to catch Enter (13) and Escape (27) keys to act as if the buttons were clicked.
The problem I have is when typing in string gadget and hit Enter it automatically closes the window at VANILLAKEY with Enter (13) key. How do I stop this?
I want:
type type type ENTER
deactivate string gadget
Enter (fake click on OK button)
I have been trying to catch it with a hook but can't quite get it to do want I want.
I have put GA_RelVerify to FALSE, also.
LAYOUT_AddChild, ChildObjects[GAD_STRING]=StringObject, GA_ID, GAD_STRING, GA_RelVerify, TRUE, GA_TabCycle, TRUE, STRINGA_TextVal, "", STRINGA_WorkBuffer, GlobalStringBuffer, STRINGA_MaxChars, 128, STRINGA_MinVisible, 25, STRINGA_EditHook, catchEnterHook, TAG_DONE),