//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SetSelTextBuf.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: SetSelTextBuf
// Method: StdCtrls.TCustomEdit.SetSelTextBuf

// BeginCode
/*
This example inserts the contents of temp_string at the
current location of the cursor.
*/
void __fastcall TForm1::FormCreate(TObject *Sender)
{
   const AnsiString Path = "../readme.txt";
   Memo1->Lines->LoadFromFile(Path);
}

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  WideChar *temp_string = L"I am now here";
  Memo1->SetSelTextBuf(temp_string);
}
// EndCode
// EndExample: SetSelTextBuf
//---------------------------------------------------------------------------
