Menu

#24 about the keyboard message

open
nobody
Core (23)
5
2010-05-14
2010-05-14
layre
No

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.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB