Can anyone tell how to read a picture (e g .bmp) from file and insert it into a CRichEditCtrl containing text for printing? What is the most convenient way? I dont need to edit the picture after inserting, only to print!
I think the PasteSpecial member function of CRichEditCtrl will do what you want. Here's the information:<br><br>=========================================================<br>void PasteSpecial( UINT nClipFormat, DWORD dvAspect = 0, HMETAFILE hMF = 0 );<br><br>Parameters<br><br>nClipFormat<br><br>Clipboard format to paste into this CRichEditCtrl object.<br><br>dvAspect<br><br>Device aspect for the data to be retrieved from the Clipboard.<br><br>hMF<br><br>Handle to the metafile containing the iconic view of the object to be pasted.<br><br>Remarks<br><br>Call this function to paste data in a specific Clipboard format into this CRichEditCtrl object. The new material is inserted at the insertion point, the location of the caret<br>=========================================================<br><br>Hope this helps! <p>Pat Gleason<br><a href=mailto:gleason@megsinet.net>gleason@megsinet.net</a><br><a href= > </a><br>
Thanks for answer!<br><br>I have tried PasteSpecial without success.<br><br>Instead I've been successfull in using CreateFromFile, REOBJECT and InsertObject. The problem that remains unsolved is, how to handle pictures in other fileformats (.jpg,.gif, ...).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.