Реферат: Разработка текстового редактора

#include "LogoStrs.h"

const float RulerAdj = 4.0/3.0;

const int GutterWid = 6;

#pragma link "CGRID"

#pragma resource "*.dfm"

TForm1 *Form1;

__fastcall TForm1::TForm1(TComponent *Owner)

: TForm(Owner)

{

}

void __fastcall TForm1::RichEdit1SelectionChange(TObject *Sender)

{

char sizebuf[6];

try {

FUpdating = True;

ComboBox1->Text = RichEdit1->SelAttributes->Name;

FirstInd->Left = int(RichEdit1->Paragraph->FirstIndent*RulerAdj)-4+GutterWid;

LeftInd->Left = int((RichEdit1->Paragraph->LeftIndent+

RichEdit1->Paragraph->FirstIndent)*RulerAdj)-4+GutterWid;

RightInd->Left = Ruler->ClientWidth-6-int(

(RichEdit1->Paragraph->RightIndent+GutterWid)*RulerAdj);

if (CurrText()->Style==CurrText()->Style >> fsItalic)

ToolButton17->Down=false;

else ToolButton17->Down=true;

if (CurrText()->Style==CurrText()->Style >> fsBold)

ToolButton15->Down=false;

else ToolButton15->Down=true;

if (CurrText()->Style==CurrText()->Style >> fsUnderline)

ToolButton3->Down=false;

К-во Просмотров: 798
Бесплатно скачать Реферат: Разработка текстового редактора