/*
GetTextLen, GetTextBuf, Text example
This example copies the text in an edit box into a null-terminated string, and puts this string in another edit box when the user clicks the button on the form.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  int Size = Edit1->GetTextLen(); //Get length of string in Edit1
  Size++;                      //Add room for null character
  char *Buffer = new char[Size];  //Creates Buffer dynamic variable
  Edit1->GetTextBuf(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->Text;
} 
