3

I have to create a RTF file using C++ and MFC. This RTF file will contain images with a link on each of them.

The RTF is always in memory, it's never written on the hard disk.

I need to insert an image in the RTF file at runtime(the image is not always the same). Is it possible to do so with MFC? I'm not sure if CRichEditCtrl can do that...

Thanks

Michael
  • 1,557
  • 2
  • 18
  • 38

2 Answers2

1

See Insert image into Rich Edit.

  • I used this method(got from your link): http://support.microsoft.com/kb/220844 I can finally generate a rtf, but instead of the real image being in the rtf, I get only the name of the file in a picture.. quite useless! I'm using CRichTextCtrl::StreamOut method to generate the RTF. Anyone knows why? – Michael May 25 '11 at 15:51
1

Finally, the method at this page worked:

http://www.codeguru.com/Cpp/controls/richedit/article.php/c5383

Michael
  • 1,557
  • 2
  • 18
  • 38