.


:




:

































 

 

 

 


.




C++Builder RTF. TOpenDialog, TSaveDialog, TFontDialog TPrintDialog. TMainMenu, TRichEdit, TPanel, TEdit, TSpeedButton. TComboBox, TUpDown, TLabel, TBevel - RICHEDIT.HLP.

=> File | Open Project .

=> \...\CBuilder\Examples\Apps\RichEdit.

=> RichEdit Open.


. 4.21. .

. 4.21 , , , C++Builder.

TRichEdit , RichEditl->Paragraph . FontName , TComboBox. FontSize TEdit, TUpDown. -

( TLabel): Leftind, Firstind Rightind ( ). StatusBar, .

, .

File Edit Help  
New Open Save Save As     Undo   Contents Search for Help On How to Use Help  
Cut Copy Paste  
About  
Print Font      
Exit      

 

(, Microsoft Word) RICHEDIT.RTF \...\CBuilder\Examples\Apps\RichEdit\Help, RICHEDIT.HLP BUILDHLP.BAT. Help .

, , . 4.1 Romain.cpp . , , , , .

ttinclude <vcl.h> ttinclude <windows.hpp> ftpragma hdrstop

#include "Romain.h"

^include "RichAbt.h"

const float RulerAdj = 4.0/3.0; //

const int GutterWid = 6; //

//-----_-------________--________--________--_____-__--_____

#pragma resource "*.dfm" TMainForm *MainForm;

// _ fastcall TMainForm::TMainForm(TComponent *0wner)

: TFormfOwner) { SetFileName((AnsiString)"Untitled");

)

// void _fastcall TMainForm::SelectionChange(TObject*) { char sizebuf[6];

try { FUpdating = true;

FirstInd->Left = // int (RichEditl->Paragraph->FirstIndent*RulerAdj)-

4+GutterWid;

LeftInd->Left = // int( (RichEditl->Paragraph->LeftIndent+

RichEditl->Paragraph->FirstIndent)*RulerAdj)-

4+GutterWid;

RightInd->Le?t = II " Ruler->ClientWidth-6-

int( (RichEditl->Paragraph->RightIndent+GutterWid)*

RulerAdj);

BoldButton->Down = // "" RichEditl->SelAttributes->Style.Contains(fsBold);

ItalicButton->Down = // "" RichEditl->SelAttributes->Style.Contains(fsltalic);

UnderlineButton->Down = // "." RichEditl->SelAttributes->Style.Contains(fsUnderline);

BulletsButton->Down = // "" bool (RichEditl->Paragraph->Numbering);

FontSize->Text = // itoa(RichEditl->SelAttributes->Size, sizebuf, 10);

FontName->Text = // RichEditl->SelAttributes->Name;

// switch((int) RichEditl->Paragraph->Alignment) { case 0: LeftAlign->Down = true; break;

case 1: RightAlign->Down = true; break;

case 2: CenterAlign->Down = true; break;

} }





:


: 2015-10-01; !; : 401 |


:

:

, .
==> ...

1764 - | 1585 -


© 2015-2024 lektsii.org - -

: 0.011 .