Курсовая работа: Алгоритм, написание и отладка программы "Текстовый редактор"
{
RichEdit1->CutToClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton5Click(TObject *Sender)
{
RichEdit1->CopyToClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton9Click(TObject *Sender)
{
RichEdit1->PasteFromClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::N20Click(TObject *Sender)
{
ReplaceDialog1->Execute();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ReplaceDialog1Replace(TObject *Sender)
{
TReplaceDialog *dlg = (TReplaceDialog *)Sender;
int SelPos = RichEdit1->Lines->Text.Pos(dlg->FindText);
if (SelPos > 0)
{
RichEdit1->SelStart = SelPos - 1;
RichEdit1->SelLength = dlg->FindText.Length();
RichEdit1->SelText = dlg->ReplaceText;
}