Реферат: Разработка текстового редактора
}
}
void __fastcall TForm1::ReplaceDialog1Replace(TObject *Sender)
{
if (RichEdit1->SelLength == 0)
FindDialog1Find(Sender);
else
{
RichEdit1->SelText = ReplaceDialog1->ReplaceText;
FindDialog1Find(Sender);
}
if (ReplaceDialog1->Options.Contains(frReplaceAll))
while (RichEdit1->SelLength !=0)
ReplaceDialog1Replace(Sender);
}
void __fastcall TForm1::ReplaceClick(TObject *Sender)
{
ReplaceDialog1->Execute();
}
void __fastcall TForm1::N5Click(TObject *Sender)
{
FontDialog1->Options << fdApplyButton;
FontDialog1->Execute();
}
void __fastcall TForm1::FontDialog1Apply(TObject *Sender, HWND Wnd)
{
if (ActiveControl->ClassNameIs("TEdit"))
((TEdit *)ActiveControl)->Font->Assign(FontDialog1->Font);
else if (ActiveControl->ClassNameIs("TRichEdit"))