Solved

DLL - RTF

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

17 Experts available now in Live!

Get 1:1 Help Now