Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Graphic in Rich text?

Posted on 1998-10-16
5
Medium Priority
?
175 Views
Last Modified: 2010-04-06
I am trying to load a rtf file containing a graphic into a richedit. It will load only the lines, but i do not know how to load the graphics?
0
Comment
Question by:zonk
  • 2
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 150 total points
ID: 1343138
zonk,

this is not possible, because the Trichedit is a descendant of the windows richedit, which doesn't has these capabilities...

Just test it by pasting a wordpad text with image to your richedit... text will be displayed, but image not!

Go to this page and download this freeware component

TRichEditWithOle

find sources etc at his homepage http://wet.kiss.uni-lj.si/~k4fe0106/ 

also, look at this thread ...

http://www.experts-exchange.com/topics/comp/lang/delphi/Q.10077554

Regards, Zif.
0
 
LVL 2

Expert Comment

by:Thaddy
ID: 1343139
Ziffnab is not completely Right. The control itself has a couple of com extensions that are not implemented in the VCL (Omission from borland/inprise).
(But you can still do the trick)
Yes, this IS possible, even easy, with a little trickery.

You need to implement just two -documented- COM interfaces
-IRichEditOleCallback
-IRichEditOle
I found them a couple of years ago in MS C++ headerfiles.
RichOle.h.
I'll send you an answer if you want. It works great!
The code is a simplified version of something I found on the web,
I simplified it for an SDGN session by me last September.

0
 
LVL 2

Expert Comment

by:Thaddy
ID: 1343140
Ziffnab is not completely Right. The control itself has a couple of com extensions that are not implemented in the VCL (Omission from borland/inprise).
(But you can still do the trick)
Yes, this IS possible, even easy, with a little trickery.

You need to implement just two -documented- COM interfaces
-IRichEditOleCallback
-IRichEditOle
I found them a couple of years ago in MS C++ headerfiles.
RichOle.h.
I'll send you an answer if you want. It works great!
The code is a simplified version of something I found on the web,
I simplified it for an SDGN session by me last September.

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1343141
Hi Thaddy, correct, that's why I gave the link to the component, which implements them. Zif.
0
 

Author Comment

by:zonk
ID: 1343142
SO the two solutions are identical?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

926 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