Недавно добавленные исходники

•  DeLiKaTeS Tetris (Тетрис)  172

•  TDictionary Custom Sort  3 344

•  Fast Watermark Sources  3 095

•  3D Designer  4 853

•  Sik Screen Capture  3 351

•  Patch Maker  3 556

•  Айболит (remote control)  3 665

•  ListBox Drag & Drop  3 020

•  Доска для игры Реверси  81 748

•  Графические эффекты  3 948

•  Рисование по маске  3 253

•  Перетаскивание изображений  2 633

•  Canvas Drawing  2 761

•  Рисование Луны  2 586

•  Поворот изображения  2 196

•  Рисование стержней  2 172

•  Paint on Shape  1 570

•  Генератор кроссвордов  2 241

•  Головоломка Paletto  1 771

•  Теорема Монжа об окружностях  2 238

•  Пазл Numbrix  1 685

•  Заборы и коммивояжеры  2 059

•  Игра HIP  1 282

•  Игра Go (Го)  1 232

•  Симулятор лифта  1 477

•  Программа укладки плитки  1 219

•  Генератор лабиринта  1 549

•  Проверка числового ввода  1 369

•  HEX View  1 497

•  Физический маятник  1 359

 
скрыть


Delphi FAQ - Часто задаваемые вопросы

| Базы данных | Графика и Игры | Интернет и Сети | Компоненты и Классы | Мультимедиа |
| ОС и Железо | Программа и Интерфейс | Рабочий стол | Синтаксис | Технологии | Файловая система |



Delphi Sources

Загрузить RTF файл из ресурса своего EXE




(* 
  Load RTF file from resource: 

  You can store any kind of file as a RCDATA resource. 
  The following example shows this with an RTF file. 

  Create a text file called textres.rc and put the 
  following line in it: 

  TESTDOC RCDATA "textdoc.rtf" 

  Next, compile that using the Borland Resource Compiler, 
  which is provided with Delphi. 

  brcc32.exe textres.rc 
   
  Your next step is to include the compiled resource (.RES) file into 
  your executable, which can be done with the {$R} compiler directive. 

*) 

(* 

  Man kann eine beliebige Datei als RCDATA Ressource in eine 
  Exe-Datei einbinden. 
  Das folgende Beispiel zeigt, wie man einen RTF-Text aus 
  einer Ressource ladt und in einem TRichEdit anzeigt. 

  Erstelle zuerst eine Datei "textres.rc" mit folgendem Inhalt: 

  TESTDOC RCDATA "textdoc.rtf" 

  Kompiliere diese mit brcc32.exe: 

  brcc32.exe textres.rc 
   
  Es wurde nun eine textres.res Datei erzeugt. 

*) 


implementation 

{$R *.dfm} 
{$R textres.res}  // <---- your resource file! 

procedure TForm1.Button1Click(Sender: TObject); 
var 
  rs: TResourceStream; 
begin 
  rs := TResourceStream.Create(hinstance, 'TESTDOC', RT_RCDATA); 
  try 
    Richedit1.PlainText := False; 
    TempStream.Position := 0; 
    Richedit1.Lines.LoadFromStream(rs); 
  finally 
    rs.Free; 
  end; 
end;





Похожие по теме исходники

Чтение PSD файлов

Шифратор файлов

Разбиение файла на части

Поиск файлов

 

FileMan (менеджер файлов)

Поиск открытых файлов

Текст внутри файла

Erase self EXE

 

EXE/PE Properties

Binary Search Images in EXE

HWnd2EXE

Exec and Wait

 

Add Code to EXE

Executor

ExeFog (сжатие EXE)

PE EXE Coder

 



Copyright © 2004-2024 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте