function DoKeyPress(var Message: TWMKey): Boolean;
bool __fastcall DoKeyPress(Winapi::Messages::TWMKey &Message);
Performs some preprocessing before generating an OnKeyPress event.
The return value from DoKeyPress determines whether the control should continue processing the key-press message passed in the Message parameter. A return value of true indicates that the key-press occurrence has been handled completely, and no further processing is needed. A return value of false indicates that the application should continue passing the key-press message through the inherited processing.
DoKeyPress checks whether the KeyPreview property of the parent form is true, and if so, allows the form to preemptively process key-press messages before they are handled by the windowed control. If the form does not handle the message, DoKeyPress translates the message parameters into the appropriate types and calls KeyPress, which in turn calls the OnKeyPress event handler, if any.