Solved

DLL - RTF

Posted on 1998-10-17
1
185 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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