Home > Back-end >  About the soft keyboard
About the soft keyboard

Time:10-08


To achieve A soft keyboard functions, A form of control can receive B input in the form (such as: the backspace key)

CodePudding user response:

 
Void __fastcall TForm2: : btn1Click (TObject * Sender)
{
SendMessage ( Form1 - & gt; Handle , WM_KEYDOWN, VK_BACK, 0);
}

Void __fastcall TForm1: : KeyDown (TMessage & amp; Msg)
{
The SendMessage (ActiveControl - & gt; Handle, WM_CHAR, Msg. WParam, NULL);
}

Private://User declarations
Void __fastcall KeyDown (TMessage& Msg);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER (TMessage WM_KEYDOWN, KeyDown);

END_MESSAGE_MAP (TForm)

Can send the backspace key to specific controls in the form, how to get any form has the input focus controls send?

CodePudding user response:

Demon elder brother, in?

CodePudding user response:

Or use a third-party control, time delay, this thing to write their own code,
  • Related