Basically, I want to close a window/dialog on ESC. E.g. About program
dialog, or Config dialog.
Have you tried :
wxWindow::OnCharHook
According to the documentation :
An example of using this function is in the implementation of escape-character processing for wxDialog, where pressing ESC dismisses the dialog by OnCharHook 'forging' a cancel button press event.