Link to home
Start Free TrialLog in
Avatar of 4C
4C

asked on

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!
Avatar of MichaelS
MichaelS

OleCreateFromFile() function for loading and after that you have to use an OLE interface from reachedit to insert it.
Inserting a bitmap file into a CRichEditCtrl
http://www.codeguru.com/richedit/rtfbitmap.shtml
Avatar of 4C

ASKER

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, ...)!
You have to convert other file formats into the bitmap file format.
Avatar of 4C

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial