• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 795
  • Last Modified:

Picture in CRichEditCtrl

What is the most convenient way to read a picture (.bmp,.gif,.jpg,...) from a file and insert it into CRichEditCtrl for to print together with text. I dont need to edit the picture inside CRichEditCtrl/CRichEditView!
0
4C
Asked:
4C
  • 3
  • 2
1 Solution
 
MichaelSCommented:
OleCreateFromFile() function for loading and after that you have to use an OLE interface from reachedit to insert it.
0
 
chensuCommented:
Inserting a bitmap file into a CRichEditCtrl
http://www.codeguru.com/richedit/rtfbitmap.shtml
0
 
4CAuthor Commented:
Thanks a lot for answer! I have tried (successfully) the method you suggest. The problem that remains unsolved is, how to handle pictures in other fileformats (.jpg,.gif, ...)!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
chensuCommented:
You have to convert other file formats into the bitmap file format.
0
 
4CAuthor Commented:
Thanks again! I've never done before this kind of fileformat conversions. Please give me a clue how and at which stage of the process (CreateFromFile->REOBJECT->InsertObject) to make the conversion.
0
 
chensuCommented:
The easiest way is to call a third party utility to convert the files before CreateFromFile. It is hard to find such a utility for free. But there must be some commerical products.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now