Solved

DLL - RTF

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

718 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