Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in CRichEditCtrl

Status
Not open for further replies.

cccc

Programmer
Mar 29, 2000
2
FI
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.&nbsp;&nbsp;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, ...).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top