⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.cpp

📁 与Action相结合,可以解决中文件显示乱码
💻 CPP
字号:
/*------------------------------------------------------------------------------
  RVStyle1->ListStyles->Items[0] has two levels -
  0th - imagelistcounter
  1st - imagelist
------------------------------------------------------------------------------*/
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma link "RVEdit"
#pragma link "RichView"
#pragma link "RVScroll"
#pragma link "RVStyle"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
#define text "Text text text. Text text text text. Text text text. Text text text text. Text text text. Text text text text."
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  RichViewEdit1->Clear();
  for (int i=0; i<5; i++)
  {
    RichViewEdit1->SetListMarkerInfo(-1, 0, 0, 1, 0, false);
    RichViewEdit1->Add(text, 3);
    RichViewEdit1->SetListMarkerInfo(-1, 0, 1, 1, 0, false);
    RichViewEdit1->Add(text, 0);
    RichViewEdit1->SetListMarkerInfo(-1, 0, 1, 1, 0, false);
    RichViewEdit1->Add(text, 0);
    RichViewEdit1->SetListMarkerInfo(-1, 0, 1, 1, 0, false);
    RichViewEdit1->Add(text, 0);
  }
  RichViewEdit1->Format();
}
//---------------------------------------------------------------------------
// This event is not used in this demo.
// But if you want to save and load this document in RVF, it is necessary.
// Note: ImageList1->Tag is set to 1, ImageList2->Tag is set to 2.
void __fastcall TForm1::RichViewEdit1RVFImageListNeeded(TCustomRichView *Sender,
	int ImageListTag, TCustomImageList *&il)
{
  switch (ImageListTag)
  {
    case 1: il = ImageList1; break;
    case 2: il = ImageList2; break;
  }
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -