Solved

DLL - RTF

Posted on 1998-10-17
1
178 Views
Last Modified: 2010-04-06
I have a DLL i stored a RTF file in,
data.rc = text1 RTF "myfile.rtf"

and i made the dll blabla..and i know how to load Pics etc from a dll..

BUT how do i load a RTF from a DLL into a TRichEdit
????
0
Comment
Question by:brainware
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1343257
Try this:

var
TheStream : TResourceStream;

.
try
  TheStream := TResourceStream.Create(DLLHandle, 'MyRTFResource', RT_RCDATA);
  MyRichEdit.Lines.LoadFromStream(TheStream);
finally
  TheStream.Free;
end;

Change the RT_RCDATA constant if it is not stored in an RC_DATA resource.

Cheers,

Raymond.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now