in the class TWinControl(in file wincontrol.cpp),the part of code:
if(ActiveControl != NULL)
{
ActiveControl->CMKeyPress(Key);
return;
}
in three functions CMKeyDown,CMKeyUp,CMKeyPress is better to change to:
if(ActiveControl != NULL)
{
ActiveControl->CMKeyPress(Key);
if (dynamic_cast<TForm*>(ActiveControl))
return;
}
so that,the keyboard message could send to the parent window of the control.