[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

DLL - RTF

Posted on 1998-10-17
1
Medium Priority
?
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

656 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