Listbox captures all keyboard events
Posted: Mon 26 Feb, 2018 17:09
Hi!
I would appreciate a little help with a listbox: I have a simple dialog with a listbox and several buttons with DIF_BTNNOCLOSE. The buttons have a hotkey assigned via a caption (e.g. "&Edit" or "&Delete"). If a button has a focus, pressing ALT+E (or even just E) causes a DN_BTNCLICK message for that button to be sent, I can capture it and handle it. However, if the listbox has a focus, neither ALT+E nor E cause the button to be clicked, I have to actually use the mouse (or make the button default, then ENTER would work). What can I do to stop the listbox from capturing these keys and make it pass them on to the buttons? I can make a special test within DN_CONTROLINPUT, but I would rather avoid that as it would make it difficult to e.g. change the hotkey (if ther listbox didn't capture my keys, I could simply change the language string and be done with that).
Testing with FAR3 x86 build 5134.
Pepak
I would appreciate a little help with a listbox: I have a simple dialog with a listbox and several buttons with DIF_BTNNOCLOSE. The buttons have a hotkey assigned via a caption (e.g. "&Edit" or "&Delete"). If a button has a focus, pressing ALT+E (or even just E) causes a DN_BTNCLICK message for that button to be sent, I can capture it and handle it. However, if the listbox has a focus, neither ALT+E nor E cause the button to be clicked, I have to actually use the mouse (or make the button default, then ENTER would work). What can I do to stop the listbox from capturing these keys and make it pass them on to the buttons? I can make a special test within DN_CONTROLINPUT, but I would rather avoid that as it would make it difficult to e.g. change the hotkey (if ther listbox didn't capture my keys, I could simply change the language string and be done with that).
Testing with FAR3 x86 build 5134.
Pepak