/*
GetSelTextBuf, SelText example
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  int Size = Edit1->SelLength; //Get length of selected text in Edit1
  Size++;                      //Add room for null character
  char *Buffer = new char[Size];  //Creates Buffer dynamic variable
  Edit1->GetSelTextBuf(Buffer,Size); //Puts Edit1->Text into Buffer
  Edit2->Text = Buffer;
  delete Buffer;
}
/*
Note: the same thing could be accomplished more simply as follows:
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Edit2->Text = Edit1->SelText;
} 
