I've been looking through the archive to see if there's a concrete answer abouthow to capture key events at the top-most window level when there are controls inside the window that can receive the focus. For example, if I've got a frame with a radio box in it, how can I capture keystrokes in the frame and use them to set which radio button is selected?
I've seen something about overriding ProcessEvent, but I have no idea how to go about doing it, or if it's the "best" solution. Does anyone have some example code or a method of how to do this?
Thanks,
Pete
Peter Parente wrote:
I've been looking through the archive to see if there's a concrete answer abouthow to capture key events at the top-most window level when there are controls inside the window that can receive the focus. For example, if I've got a frame with a radio box in it, how can I capture keystrokes in the frame and use them to set which radio button is selected?
Your best bet is probably to use a wxAccelerator table. This will let your frame (or app) object handle the specified keystrokes without concern for where the focus is.
Jeff Shannon
Technician/Programmer
Credit International