Solved

OLE in Delphi without using the clipboard

Posted on 2004-08-23
6
491 Views
Last Modified: 2012-05-05
In my last question asked here I ask how to put pictures in a Richedit control. I found the solution in the form of a zip
file MyRicheditEx I don't remember exactly where.  The solution worked.  However the sample code give uses the clipboard to insert picture.  The following code insets the picture. I would like to know how to do this with using the clipboard.


procedure insertbmp(MyRich: TRichedit; bmpname: string);
 var
   pict: Tpicture;
begin

   Pict := TPicture.Create;
   Pict.LoadFromFile(bmpname);
   Clipboard.Assign(Pict);
   MyRich.PasteFromClipboard;
end;

I found some code on this board to back up and restore the clipboard but I would perfer not to use the cliboard at all.
0
Comment
Question by:WilliamHarter
  • 2
6 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 500 total points
ID: 11883222
Maybe check out http://www.trichview.com/ to save development time... Includes full source for only $189,-

http://www.torry.net/vcl/edits/rich/richedit98.zip might be useful too, for a free component.

Keep in mind that the TRichEdit is just a wrapper around a Microsoft control. Therefore, the default Delphi code will have a few limitations...
0
 
LVL 4

Expert Comment

by:Delphian
ID: 13080516
And the best (and expensive)  richtext controls are just the ones
that reimplement the RTF standard from scratch.
But I got that standard one time: it's about 31 A4
pages on pdf.... And font Arial 10pt.... I just deleted
and forgot the subject.


0
 
LVL 4

Expert Comment

by:Delphian
ID: 13343016
Give the points to Alex.... I did just a complimentary comment.
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

Title # Comments Views Activity
Comparing dates in Delphi. Greater than/ Less than 3 113
QRReport  TQrmemo vertical stretching 1 42
Multiple image collision 13 69
Firemonkey DbLookupComboBox equivalent ? 2 32
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

929 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

6 Experts available now in Live!

Get 1:1 Help Now