I'm having a rather perplexing problem with the Escape key handler on a dialog box in Borland C++ Builder 5. Are there any other requirements for the Escape key to fire a cancel event (other than those I've listed below)?
- The "Cancel" button (a TBitBtn) has its Cancel property set to true.
- The "Cancel" button has its Default property set to false.
- The "Cancel" button has its modalResult set to mrCancel.
Note: I'm working with an old legacy app that is still being compiled in Borland C++ Builder 5. We have a separate project to replace it - I'm just doing end of life maintenance.
Update
Four months later I've finally stopped scratching my head...it turns out that the parent form for the application had a run-time OnShortCut handler defined. I just needed to disable that for the Esc handler to work on the child dialog.