Реферат: Разработка текстового редактора
str = FmtLoadStr(sOverwrite, OPENARRAY(TVarRec, (SaveDialog->FileName)));
if (MessageDlg(str, mtConfirmation, TMsgDlgButtons() << mbYes << mbNo <<
mbCancel, 0) != IDYES)
return;
}
RichEdit1->Lines->SaveToFile(SaveDialog->FileName);
FFileName = SaveDialog->FileName;
RichEdit1->Modified = false;
}
}
void __fastcall TForm1::CheckFileSave(void)
{
if ( RichEdit1->Modified ) {
switch(MessageBox(Handle, "Save Changes?",
"Confirmation",MB_YESNOCANCEL | MB_ICONQUESTION))
{ case ID_YES : FileSave1Execute(this);
case ID_CANCEL : Abort();
}
}
}
void __fastcall TForm1::FileExit1Execute(TObject *Sender)
{
Close();
}
void __fastcall TForm1::HelpAbout1Execute(TObject *Sender)
{
AboutBox->ShowModal();
}
void __fastcall TForm1::UndoClick(TObject *Sender)