看了这篇文章:://blog.csdn.net/aroc_lo/article/details/38387379
才知道,CTRA+A == 1,我用的C++Builder,下面是改进的代码:
void __fastcall TfrmMain::Memo1KeyPress(TObject *Sender, wchar_t &Key) { if(Key == 1){ Memo1->SelectAll(); Key = 0; // 设置 Key 为 0,不然会滴滴响 } }
sdragonx https://github.com/sdragonx