In a Delphi VCL form, when a TDateTimePicker field is open, and a user-defined cancel button is clicked, all that happens is that the onCloseUp action is processed. The Cancel.OnClick event is not fired.
This means that the user has to press the Cancel button twice to get it to fire.
I have a work-around, so that when the TDateTimePicker field is opened (KeyDown) I change the Cancel button caption to "Stop Processing", and when the onCloseUp action is fired I change it back. This means that the user doesn't realise that the Cancel button is being clicked twice.
A similar problem applies with the TComboBox as well.
Is there a more elegant solution to this problem / software feature.